<?xml version="1.0" encoding="us-ascii"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:om="http://www.openmath.org/OpenMath" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:foo="http://whatever" version="2.0">
	<xsl:include href="openmath/greek.xsl"/>
	<xsl:include href="openmath/plangeo.xsl"/>

	<!-- *****************************************************************

       Common rendering

       ***************************************************************** -->

	<xsl:template match="om:OMATTR|OMATTR">
		<xsl:choose>
			<xsl:when test="@brackets='round'">
				<math:mfenced open="(" close=")" separator=",">
					<xsl:apply-templates select="*[1]"/>
				</math:mfenced>
			</xsl:when>
			<xsl:when test="@brackets='square'">
				<math:mfenced open="[" close="]" separator=",">
					<xsl:apply-templates select="*[1]"/>
				</math:mfenced>
			</xsl:when>
			<xsl:when test="@brackets='brace'">
				<math:mfenced open="{{" close="}}" separator=",">
					<xsl:apply-templates select="*[1]"/>
				</math:mfenced>
			</xsl:when>
			<xsl:when test="@brackets='none'">
				<math:mfenced open="" close="" separator=",">
					<xsl:apply-templates select="*[1]"/>
				</math:mfenced>
			</xsl:when>
			<xsl:when test="@brackets='angle'">
				<math:mfenced open="&#x2329;" close="&#x232A;" separator=",">
					<xsl:apply-templates select="*[1]"/>
				</math:mfenced>
			</xsl:when>
			<xsl:otherwise>
				<math:mfenced open="(" close=")" separator=",">
					<xsl:apply-templates select="*[1]"/>
				</math:mfenced>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template match="om:OMA|OMA">
		<xsl:choose>
			<xsl:when test="@style='sub'">
				<math:mrow>
					<math:msub>
						<xsl:apply-templates select="*[1]"/>
						<math:mfenced open="" close="" separator=",">
							<xsl:for-each select="*[position()&gt;1]">
								<xsl:apply-templates select="."/>
							</xsl:for-each>
						</math:mfenced>
					</math:msub>
				</math:mrow>
			</xsl:when>
			<xsl:when test="@style='sup'">
				<math:mrow>
					<math:msup>
						<xsl:apply-templates select="*[1]"/>
						<math:mfenced open="" close="" separator=",">
							<xsl:for-each select="*[position()&gt;1]">
								<xsl:apply-templates select="."/>
							</xsl:for-each>
						</math:mfenced>
					</math:msup>
				</math:mrow>
			</xsl:when>
			<xsl:when test="@style='right'">
				<math:mrow>
					<math:mfenced open="(" close=")" separator=",">
						<xsl:for-each select="*[position()&gt;1]">
							<xsl:apply-templates select="."/>
						</xsl:for-each>
					</math:mfenced>
					<math:mrow>
						<xsl:apply-templates select="*[1]"/>
					</math:mrow>
				</math:mrow>
			</xsl:when>
			<xsl:when test="@style='brackets'">
				<math:mrow>
					<math:mo>(</math:mo>
					<xsl:apply-templates select="*[2]"/>
					<math:mfenced open="" close="" separator="">
						<xsl:for-each select="*[position()&gt;2]">
							<xsl:apply-templates select="."/>
						</xsl:for-each>
					</math:mfenced>
					<math:mo>)</math:mo>
				</math:mrow>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>
					<math:mrow>
						<xsl:apply-templates select="*[1]"/>
					</math:mrow>
					<math:mfenced open="(" close=")" separator=",">
						<xsl:for-each select="*[position()&gt;1]">
							<xsl:apply-templates select="."/>
						</xsl:for-each>
					</math:mfenced>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template match="om:OMBIND|OMBIND">
		<math:mrow>
			<xsl:for-each select="*">
				<xsl:apply-templates select="."/>
			</xsl:for-each>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMBVAR|OMBVAR">
		<math:mrow>
			<xsl:for-each select="*">
				<xsl:apply-templates select="."/>
				<xsl:if test="position() &lt; last()">,</xsl:if>
			</xsl:for-each>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OME|OME">
		<math:mrow>
			<math:mi>
				<xsl:value-of select="*[1]/@cd"/>.
				<xsl:value-of select="*[1]/@name"/>
			</math:mi>
			<math:mfenced open="(" close=")" separator=",">
				<xsl:for-each select="*[position()&gt;1]">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
			</math:mfenced>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMF|OMF">
		<math:mn>
			<xsl:value-of select="@dec"/>
		</math:mn>
	</xsl:template>

	<xsl:template match="om:OMI|OMI">
		<math:mn>
			<xsl:apply-templates/>
		</math:mn>
	</xsl:template>

	<xsl:template match="om:OMOBJ|OMOBJ">
		<math:math xmlns="http://www.w3.org/1998/Math/MathML" mode="inline">
			<xsl:apply-templates/>
		</math:math>
	</xsl:template>

	<xsl:template match="om:OMS|OMS">
		<math:mrow>
			<math:mi>
				<xsl:value-of select="@cd"/>.<xsl:value-of select="@name"/></math:mi>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMSTR|OMSTR">
		<math:mtext>
			<xsl:value-of select="."/>
		</math:mtext>
	</xsl:template>

	<xsl:template match="om:OMV|OMV">
		<xsl:choose>
			<xsl:when test="*">
				<math:mrow>
					<math:msub>
						<math:mi>
							<xsl:value-of select="@name"/>
						</math:mi>
						<math:mrow>
							<xsl:for-each select=".">
								<xsl:apply-templates/>
							</xsl:for-each>
						</math:mrow>
					</math:msub>
				</math:mrow>
			</xsl:when>
			<xsl:when test="contains(@name,'_')">
				<!--xsl:value-of select="foo:variable2sub(@name)"/-->
				<math:mrow>
					<math:msub>
						<math:mi>
							<xsl:value-of select="substring-before(@name,'_')"/>
						</math:mi>
						<math:mfenced open="" close="" separator=",">
							<math:mi>
								<xsl:value-of select="substring-after(@name,'_')"/>
							</math:mi>
						</math:mfenced>
					</math:msub>
				</math:mrow>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>
					<math:mi>
						<xsl:value-of select="@name"/>
					</math:mi>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<!--xsl:function name="foo:variable2sub">
		<xsl:param name="x"/>
		<xsl:sequence select="&lt;math:mrow&gt;
			&lt;math:msub&gt;
				&lt;math:mi&gt;
					&lt;xsl:value-of select='substring-before($x,'_')'/&gt;
				&lt;/math:mi&gt;
				&lt;math:mfenced open='' close='' separator=','&gt;
					&lt;xsl:choose&gt;
						&lt;xsl:when test='contains(substring-after($x,'_'),'_')'&gt;
							&lt;xsl:value-of select='foo:variable2sub(substring-after($x,'_'))'/&gt;
						&lt;/xsl:when&gt;
						&lt;xsl:otherwise&gt;
							&lt;math:mi&gt;
								&lt;xsl:value-of select='substring-after($x,'_')'/&gt;
							&lt;/math:mi&gt;
						&lt;/xsl:otherwise&gt;
					&lt;/xsl:choose&gt;
				&lt;/math:mfenced&gt;
			&lt;/math:msub&gt;
		&lt;/math:mrow&gt;"/>
	</xsl:function-->

	<!-- *********************************************************************

       alg1

       ***************************************************************** -->

	<xsl:template match="om:OMS[@cd='alg1' and @name='zero']|OMS[@cd='alg1' and @name='zero']">
		<math:mrow>
			<math:mn>0</math:mn>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='alg1' and @name='one']|OMS[@cd='alg1' and @name='one']">
		<math:mrow>
			<math:mn>1</math:mn>
		</math:mrow>
	</xsl:template>

	<!-- *****************************************************************

       arith1

       ***************************************************************** -->


	<xsl:template match="om:OMA[om:OMS[@cd='arith1' and @name='abs']]|OMA[OMS[@cd='arith1' and @name='abs']]">
		<math:mrow>
			<math:mo>|</math:mo>
			<xsl:for-each select="*[position()&gt;1]">
				<xsl:apply-templates select="."/>
			</xsl:for-each>
			<math:mo>|</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='arith1' and @name='divide']]|OMA[OMS[@cd='arith1' and @name='divide']]">
		<xsl:choose>
			<xsl:when test="@style='frac:big'">
				<math:mfrac>
					<xsl:apply-templates select="*[2]"/>
					<xsl:apply-templates select="*[3]"/>
				</math:mfrac>
			</xsl:when>
			<xsl:when test="@style='brackets'">
				<math:mrow>
					<math:mo>(</math:mo>
					<xsl:apply-templates select="*[2]"/>
					<math:mo>/</math:mo>
					<xsl:apply-templates select="*[3]"/>
					<math:mo>)</math:mo>
				</math:mrow>
			</xsl:when>
			<xsl:when test="@style='nobrackets'">
				<math:mrow>
					<xsl:apply-templates select="*[2]"/>
					<math:mo>/</math:mo>
					<xsl:apply-templates select="*[3]"/>
				</math:mrow>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>
					<xsl:choose>
						<xsl:when test="*[2]/self::om:OMA[om:OMS[@name='plus']]| *[2]/self::om:OMA[om:OMS[@name='minus']]|*[2]/self::OMA[OMS[@name='plus']]| *[2]/self::OMA[OMS[@name='minus']]">
							<math:mo>(</math:mo>
							<xsl:apply-templates select="*[2]"/>
							<math:mo>)</math:mo>
						</xsl:when>
						<xsl:otherwise>
							<xsl:apply-templates select="*[2]"/>
						</xsl:otherwise>
					</xsl:choose>
					<math:mo>/</math:mo>
					<xsl:choose>
						<xsl:when test="*[3]/self::om:OMA[om:OMS[@name='plus']] | *[3]/self::om:OMA[om:OMS[@name='times']] | *[3]/self::om:OMA[om:OMS[@name='minus']] | *[3]/self::om:OMA[om:OMS[@name='divide']]|*[3]/self::OMA[OMS[@name='plus']] | *[3]/self::OMA[OMS[@name='times']] | *[3]/self::OMA[OMS[@name='minus']] | *[3]/self::OMA[OMS[@name='divide']]">
							<math:mo>(</math:mo>
							<xsl:apply-templates select="*[3]"/>
							<math:mo>)</math:mo>
						</xsl:when>
						<xsl:otherwise>
							<xsl:apply-templates select="*[3]"/>
						</xsl:otherwise>
					</xsl:choose>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template match="om:OMS[@name='gcd' and @cd='arith1']|OMS[@name='gcd' and @cd='arith1']">
		<math:mrow>
			<math:mi>gcd</math:mi>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='gcd' and @cd='arith1']]|OMA[OMS[@name='gcd' and @cd='arith1']]">
		<math:mrow>
			<math:mi>gcd</math:mi>
			<math:mfenced open="(" close=")" separator=",">
				<xsl:for-each select="*[position() &gt; 1]">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
			</math:mfenced>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@name='lcm' and @cd='arith1']|OMS[@name='lcm' and @cd='arith1']">
		<math:mrow>
			<math:mi>lcm</math:mi>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='lcm' and @cd='arith1']]|OMA[OMS[@name='lcm' and @cd='arith1']]">
		<math:mrow>
			<math:mi>lcm</math:mi>
			<math:mfenced open="(" close=")" separator=",">
				<xsl:for-each select="*[position() &gt; 1]">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
			</math:mfenced>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='arith1' and @name='minus']]|OMA[OMS[@cd='arith1' and @name='minus']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<xsl:for-each select="*[3]">
				<xsl:choose>
					<xsl:when test="self::om:OMA[om:OMS[@name='unary_minus']]|self::OMA[OMS[@name='unary_minus']]">
						<math:mo>-(</math:mo>
						<xsl:apply-templates select="."/>
						<math:mo>)</math:mo>
					</xsl:when>
					<xsl:when test="self::om:OMA[om:OMS[@name='plus']]|self::OMA[OMS[@name='plus']]">
						<math:mo>-(</math:mo>
						<xsl:apply-templates select="."/>
						<math:mo>)</math:mo>
					</xsl:when>
					<xsl:otherwise>
						<math:mo>-</math:mo>
						<xsl:apply-templates select="."/>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:for-each>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='arith1' and @name='plus']|OMS[@cd='arith1' and @name='plus']">
		<math:mo>+</math:mo>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='arith1' and @name='plus']]|OMA[OMS[@cd='arith1' and @name='plus']]">
		<math:mrow>
			<xsl:choose>
				<xsl:when test="@style='brackets'">
					<math:mrow>
						<math:mo>(</math:mo>
						<xsl:for-each select="*[2]">
							<xsl:choose>
								<xsl:when test="self::om:OMA|self::OMA">
									<math:mo>(</math:mo>
									<xsl:apply-templates select="."/>
									<math:mo>)</math:mo>
								</xsl:when>
								<xsl:otherwise>
									<xsl:apply-templates select="."/>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>
						<xsl:for-each select="*[position()&gt;2]">
							<xsl:choose>
								<xsl:when test="self::om:OMA|self::OMA">
									<math:mo>+</math:mo>
									<math:mo>(</math:mo>
									<xsl:apply-templates select="."/>
									<math:mo>)</math:mo>
								</xsl:when>
								<xsl:otherwise>
									<math:mo>+</math:mo>
									<xsl:apply-templates select="."/>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>
						<math:mo>)</math:mo>
					</math:mrow>
				</xsl:when>
				<xsl:otherwise>
					<xsl:apply-templates select="*[2]"/>
					<xsl:for-each select="*[position()&gt;2]">
						<xsl:choose>
							<xsl:when test="self::om:OMA[om:OMS[@name='unary_minus']]|self::OMA[OMS[@name='unary_minus']]">
								<math:mo>+(</math:mo>
								<xsl:apply-templates select="."/>
								<math:mo>)</math:mo>
							</xsl:when>
							<xsl:when test="self::om:OMA[om:OMS[@name='plus']]|self::OMA[OMS[@name='plus']]">
								<math:mo>+(</math:mo>
								<xsl:apply-templates select="."/>
								<math:mo>)</math:mo>
							</xsl:when>
							<xsl:otherwise>
								<math:mo>+</math:mo>
								<xsl:apply-templates select="."/>
							</xsl:otherwise>
						</xsl:choose>
					</xsl:for-each>
				</xsl:otherwise>
			</xsl:choose>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='arith1' and @name='product']]|OMA[OMS[@cd='arith1' and @name='product']]">
		<xsl:choose>
			<xsl:when test="*[3]/self::om:OMBIND/*[1][self::om:OMS[@name='lambda']]|*[3]/self::OMBIND/*[1][self::OMS[@name='lambda']]">
				<xsl:choose>
					<xsl:when test="*[2]/self::om:OMA/*[1][self::om:OMS[@name='integer_interval']]|*[2]/self::OMA/*[1][self::OMS[@name='integer_interval']]">
						<math:munderover>
							<!-- U+220F n-ary product -->
							<math:mo>&#x220F;</math:mo>
							<math:mrow>
								<xsl:apply-templates select="om:OMBIND/om:OMBVAR|OMBIND/OMBVAR"/>
								<math:mo>=</math:mo>
								<xsl:apply-templates select="om:OMA/*[2]|OMA/*[2]"/>
							</math:mrow>
							<xsl:apply-templates select="om:OMA/*[3]|OMA/*[3]"/>
						</math:munderover>
					</xsl:when>
					<xsl:otherwise>
						<math:munder>
							<!-- U+220F N-ary product -->
							<math:mo>&#x220F;</math:mo>
							<math:mrow>
								<xsl:apply-templates select="om:OMBIND/om:OMBVAR|OMBIND/OMBVAR"/>
								<math:mo>&#x2208;</math:mo>
								<!-- U+2208 element of -->
								<xsl:apply-templates select="*[2]"/>
							</math:mrow>
						</math:munder>
					</xsl:otherwise>
				</xsl:choose>
				<math:mo>(</math:mo>
				<xsl:apply-templates select="om:OMBIND/*[3]|OMBIND/*[3]"/>
				<math:mo>)</math:mo>
			</xsl:when>
			<xsl:otherwise>
				<xsl:choose>
					<xsl:when test="*[2]/self::om:OMA/*[1][self::om:OMS[@name='integer_interval']]|*[2]/self::OMA/*[1][self::OMS[@name='integer_interval']]">
						<math:munderover>
							<math:mo>&#x220F;</math:mo>
							<!-- U+220F N-ary product -->
							<xsl:apply-templates select="om:OMA/*[2]|OMA/*[2]"/>
							<xsl:apply-templates select="om:OMA/*[3]|OMA/*[3]"/>
						</math:munderover>
					</xsl:when>
					<xsl:otherwise>
						<math:msub>
							<math:mo>&#x220F;</math:mo>
							<!-- U+220F N-ary product -->
							<xsl:apply-templates select="*[1]"/>
						</math:msub>
					</xsl:otherwise>
				</xsl:choose>
				<xsl:apply-templates select="*[2]"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='arith1' and @name='power']]|OMA[OMS[@cd='arith1' and @name='power']]">
		<math:msup>
			<math:mrow>
				<xsl:choose>
					<xsl:when test="om:OMA|OMA">
						<math:mo>(</math:mo>
						<xsl:apply-templates select="*[2]"/>
						<math:mo>)</math:mo>
					</xsl:when>
					<xsl:otherwise>
						<xsl:apply-templates select="*[2]"/>
					</xsl:otherwise>
				</xsl:choose>
			</math:mrow>
			<math:mrow>
				<xsl:apply-templates select="*[3]"/>
			</math:mrow>
		</math:msup>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='arith1' and @name='root']]|OMA[OMS[@cd='arith1' and @name='root']]">
		<xsl:choose>
			<xsl:when test="*[3]/self::om:OMI[normalize-space(.)='2']|*[3]/self::OMI[normalize-space(.)='2']">
				<!--math:mrow>
					<xsl:text>&#x221A; (</xsl:text>
					< U+221A Square root >
					<xsl:apply-templates select="*[2]"/>
					<xsl:text>)</xsl:text>
				</math:mrow-->
				<math:msqrt>
					<xsl:apply-templates select="*[2]"/>
				</math:msqrt>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>
					<math:msup>
						<math:mrow>
							<xsl:apply-templates select="*[2]"/>
						</math:mrow>
						<math:mrow>
							<xsl:text>1/</xsl:text>
							<xsl:apply-templates select="*[3]"/>
						</math:mrow>
					</math:msup>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='arith1' and @name='sum']]|OMA[OMS[@cd='arith1' and @name='sum']]">
		<xsl:choose>
			<xsl:when test="*[3]/self::om:OMBIND/*[1][self::om:OMS[@name='lambda']]|*[3]/self::OMBIND/*[1][self::OMS[@name='lambda']]">
				<xsl:choose>
					<xsl:when test="*[2]/self::om:OMA/*[1][self::om:OMS[@name='integer_interval']]|*[2]/self::OMA/*[1][self::OMS[@name='integer_interval']]">
						<math:munderover>
							<math:mo>
								<xsl:text>&#x2211;</xsl:text>
							</math:mo>
							<!-- U+2211 N-ary summation -->
							<math:mrow>
								<xsl:apply-templates select="om:OMBIND/om:OMBVAR|OMBIND/OMBVAR"/>
								<math:mo>
									<xsl:text>=</xsl:text>
								</math:mo>
								<xsl:apply-templates select="om:OMA/*[2]|OMA/*[2]"/>
							</math:mrow>
							<xsl:apply-templates select="om:OMA/*[3]|OMA/*[3]"/>
						</math:munderover>
					</xsl:when>
					<xsl:otherwise>
						<math:munder>
							<math:mo>
								<xsl:text>&#x2211;</xsl:text>
								<!-- U+2211 N-ary summation -->
							</math:mo>
							<math:mrow>
								<xsl:apply-templates select="om:OMBIND/om:OMBVAR|OMBIND/OMBVAR"/>
								<math:mo>
									<xsl:text>&#x2208;</xsl:text>
									<!-- U+2208 Element of -->
								</math:mo>
								<xsl:apply-templates select="*[2]"/>
							</math:mrow>
						</math:munder>
					</xsl:otherwise>
				</xsl:choose>
				<math:mo>(</math:mo>
				<xsl:apply-templates select="om:OMBIND/*[3]|OMBIND/*[3]"/>
				<math:mo>)</math:mo>
			</xsl:when>
			<xsl:otherwise>
				<xsl:choose>
					<xsl:when test="*[2]/self::om:OMA/*[1][self::om:OMS[@name='integer_interval']]|*[2]/self::OMA/*[1][self::OMS[@name='integer_interval']]">
						<math:munderover>
							<math:mo>&#x2211;</math:mo>
							<xsl:apply-templates select="om:OMA/*[2]|OMA/*[2]"/>
							<xsl:apply-templates select="om:OMA/*[3]|OMA/*[3]"/>
						</math:munderover>
					</xsl:when>
					<xsl:otherwise>
						<math:msub>
							<math:mo>&#x2211;</math:mo>
							<xsl:apply-templates select="*[1]"/>
						</math:msub>
					</xsl:otherwise>
				</xsl:choose>
				<xsl:apply-templates select="*[2]"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<!--
    arith1.times
    added styles cross/dot/star (default star)
  -->
	<xsl:template match="om:OMS[@cd='arith1' and @name='times']|OMS[@cd='arith1' and @name='times']">
		<xsl:choose>
			<xsl:when test="@style='cross'">
				<math:mo>
					<xsl:text>&#xD7;</xsl:text>
				</math:mo>
				<!-- U+00D7 is cross -->
			</xsl:when>
			<xsl:when test="@style='dot'">
				<math:mo>
					<xsl:text>&#xB7;</xsl:text>
				</math:mo>
				<!-- U+00B7 is dot -->
			</xsl:when>
			<xsl:when test="@style='star'">
				<math:mo>
					<xsl:text>*</xsl:text>
				</math:mo>
				<!-- U+00B7 is dot -->
			</xsl:when>
			<xsl:otherwise>
				<math:mo>
					<xsl:text>*</xsl:text>
				</math:mo>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<!--amc: snelle opvuller-->
	<xsl:template match="om:OMV[@name='times']|OMV[@name='times']">
		<math:mo>*</math:mo>
	</xsl:template>

	<xsl:template match="om:OMV[@name='plus']|OMV[@name='plus']">
		<math:mo>+</math:mo>
	</xsl:template>

	<!--
  <xsl:template match="OMV[@name='alpha']">
      <math:mo>alpha</math:mo>
  </xsl:template>
-->

	<xsl:template match="om:OMV[@name='minus']|OMV[@name='minus']">
		<math:mo>-</math:mo>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='arith1' and @name='times']]|OMA[OMS[@cd='arith1' and @name='times']]">
		<xsl:choose>
			<xsl:when test="@style='brackets'">
				<math:mrow>
					<math:mo>(</math:mo>
					<xsl:apply-templates select="*[2]"/>
					<xsl:for-each select="*[position()&gt;2]">
						<math:mo>*</math:mo>
						<xsl:apply-templates select="."/>
					</xsl:for-each>
					<math:mo>)</math:mo>
				</math:mrow>
			</xsl:when>
			<xsl:when test="@style='cross'">
				<xsl:apply-templates select="*[2]"/>
				<xsl:for-each select="*[position()&gt;2]">
					<math:mo>&#xD7;</math:mo>
					<xsl:apply-templates select="."/>
				</xsl:for-each>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>
					<xsl:for-each select="*[2]">
						<xsl:choose>
							<xsl:when test="(self::om:OMA[om:OMS[@name='unary_minus']]|self::OMA[OMS[@name='unary_minus']])">
								<math:mo>(</math:mo>
								<xsl:apply-templates select="."/>
								<math:mo>)</math:mo>
							</xsl:when>
							<xsl:when test="(self::om:OMA[om:OMS[@name='plus']] or self::om:OMA[om:OMS[@name='minus']]|self::OMA[OMS[@name='plus']] or self::OMA[OMS[@name='minus']])">
								<math:mo>(</math:mo>
								<xsl:apply-templates select="."/>
								<math:mo>)</math:mo>
							</xsl:when>
							<xsl:otherwise>
								<xsl:apply-templates select="."/>
							</xsl:otherwise>
						</xsl:choose>
					</xsl:for-each>
					<xsl:for-each select="*[position()&gt;2]">
						<xsl:choose>
							<xsl:when test="(self::om:OMA[om:OMS[@name='unary_minus']]|self::OMA[OMS[@name='unary_minus']])">
								<math:mo>*</math:mo>
								<math:mo>(</math:mo>
								<xsl:apply-templates select="."/>
								<math:mo>)</math:mo>
							</xsl:when>
							<xsl:when test="(self::om:OMA[om:OMS[@name='plus']] or self::om:OMA[om:OMS[@name='minus']]|self::OMA[OMS[@name='plus']] or self::OMA[OMS[@name='minus']])">
								<math:mo>*</math:mo>
								<math:mo>(</math:mo>
								<xsl:apply-templates select="."/>
								<math:mo>)</math:mo>
							</xsl:when>
							<xsl:otherwise>
								<math:mo>*</math:mo>
								<xsl:apply-templates select="."/>
							</xsl:otherwise>
						</xsl:choose>
					</xsl:for-each>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='arith1' and @name='unary_minus']]|OMA[OMS[@cd='arith1' and @name='unary_minus']]">
		<xsl:for-each select="*[2]">
			<xsl:choose>
				<xsl:when test="self::om:OMA|self::OMA">
					<math:mrow>
						<math:mo>-(</math:mo>
						<xsl:apply-templates select="."/>
						<math:mo>)</math:mo>
					</math:mrow>
				</xsl:when>
				<xsl:otherwise>
					<math:mrow>
						<math:mo>-</math:mo>
						<xsl:apply-templates select="."/>
					</math:mrow>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:for-each>
	</xsl:template>


	<xsl:template match="om:OMS[@cd='arith1' and @name='unary_minus']|OMS[@cd='arith1' and @name='unary_minus']">
		<math:mo>-</math:mo>
	</xsl:template>

	<!-- ********************************************************************

       arith2

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@cd='arith2' and @name='inverse']]|OMA[OMS[@cd='arith2' and @name='inverse']]">
		<math:msup>
			<math:mrow>
				<xsl:choose>
					<xsl:when test="om:OMA|OMA">
						<math:mo>(</math:mo>
						<xsl:apply-templates select="*[2]"/>
						<math:mo>)</math:mo>
					</xsl:when>
					<xsl:otherwise>
						<xsl:apply-templates select="*[2]"/>
					</xsl:otherwise>
				</xsl:choose>
			</math:mrow>
			<math:mrow>-1</math:mrow>
		</math:msup>
	</xsl:template>

	<!-- ********************************************************************

       arith3

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@name='extended_gcd' and @cd='arith3']]|OMA[OMS[@name='extended_gcd' and @cd='arith3']]">
		<math:mrow>extended-gcd
			<math:mfenced open="(" close=")" separator=",">
				<xsl:for-each select="*[position()&gt;1]">
					<math:mrow>
						<xsl:apply-templates select="."/>
					</math:mrow>
				</xsl:for-each>
			</math:mfenced>
		</math:mrow>
	</xsl:template>

	<!-- ********************************************************************

       bigfloat1

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@name='bigfloat' and @cd='bigfloat1']]|OMA[OMS[@name='bigfloat' and @cd='bigfloat1']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>&#x22C5;</math:mo>
			<math:msup>
				<xsl:apply-templates select="*[3]"/>
				<xsl:apply-templates select="*[4]"/>
			</math:msup>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='bigfloatprec' and @cd='bigfloat1']]|OMA[OMS[@name='bigfloatprec' and @cd='bigfloat1']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>&#x22C5;</math:mo>
			<math:msup>
				<xsl:apply-templates select="*[3]"/>
				<xsl:apply-templates select="*[4]"/>
			</math:msup>
		</math:mrow>
	</xsl:template>

	<!-- ********************************************************************

       calculus1 (partially implemented)

       implemented: defint, diff, int
       not implemented: nthdiff, partialdiff
       version: 4 (Revision 1)

       ******************************************************************** -->

	<!--
    transform an integral with interval
  -->
	<xsl:template match="om:OMA[om:OMS[@cd=&quot;calculus1&quot; and @name=&quot;defint&quot;] ] |     OMA[OMS[@cd=&quot;calculus1&quot; and @name=&quot;defint&quot; ]]">
		<math:apply>
			<math:int/>
			<math:bvar>
				<!-- bound variable, will be used after the d -->
				<xsl:apply-templates select="*[3]/OMBVAR | *[3]/om:OMBVAR"/>
			</math:bvar>
			<math:lowlimit>
				<!-- lower interval value, under the 's' -->
				<xsl:apply-templates select="*[2]/*[2]"/>
			</math:lowlimit>
			<math:uplimit>
				<!-- higher interval value, above the 's' -->
				<xsl:apply-templates select="*[2]/*[3]"/>
			</math:uplimit>
			<xsl:apply-templates select="*[3]/*[3]"/>
		</math:apply>
	</xsl:template>

	<!-- calculus1.diff applied on a variable -->
	<xsl:template match="     om:OMA[om:OMS[@cd=&quot;calculus1&quot; and @name=&quot;diff&quot;] and om:OMV] |     OMA[OMS[@cd=&quot;calculus1&quot; and @name=&quot;diff&quot;] and OMV]">
		<math:mrow>
			<xsl:apply-templates select="om:OMV|OMV"/>
			<math:mo>'</math:mo>
		</math:mrow>
	</xsl:template>

	<!-- calculus1.diff applied on an application -->
	<xsl:template match="     om:OMA[om:OMS[@cd=&quot;calculus1&quot; and @name=&quot;diff&quot;] and om:OMA] |     OMA[OMS[@cd=&quot;calculus1&quot; and @name=&quot;diff&quot;] and OMA]">
		<math:mrow>
			<!-- 
        no (f')' but f'' 
      -->
			<xsl:choose>
				<xsl:when test="om:OMA/om:OMS[@cd='calculus1' and @name='diff']           or OMA/OMS[@cd='calculus1' and @name='diff']">
					<xsl:apply-templates select="om:OMA|OMA"/>
					<math:mo>'</math:mo>
				</xsl:when>
				<xsl:otherwise>
					<math:mo>(</math:mo>
					<xsl:apply-templates select="om:OMA|OMA"/>
					<math:mo>)</math:mo>
					<math:mo>'</math:mo>
				</xsl:otherwise>
			</xsl:choose>
		</math:mrow>
	</xsl:template>

	<!-- calculus1.diff applied on a lambda function -->
	<xsl:template match="     om:OMA[om:OMS[@cd=&quot;calculus1&quot; and @name=&quot;diff&quot;] and om:OMBIND] |     OMA[OMS[@cd=&quot;calculus1&quot; and @name=&quot;diff&quot;] and OMBIND]">
		<math:mfrac>
			<math:mrow>
				<math:mo>
					<xsl:text>d</xsl:text>
				</math:mo>
				<xsl:apply-templates select="om:OMBIND/*[3] | OMBIND/*[3]"/>
			</math:mrow>
			<math:mrow>
				<math:mo>
					<xsl:text>d</xsl:text>
				</math:mo>
				<xsl:apply-templates select="om:OMBIND/om:OMBVAR/* | OMBIND/OMBVAR/*"/>
			</math:mrow>
		</math:mfrac>
	</xsl:template>

	<!-- calculus1.int with OMBIND -->
	<xsl:template match="om:OMA[om:OMS[@cd=&quot;calculus1&quot; and @name=&quot;int&quot;] and     om:OMBIND] | OMA[OMS[@cd=&quot;calculus1&quot; and @name=&quot;int&quot;] and OMBIND]">
		<math:mrow>
			<math:mo>
				<!-- U+222B integral -->
				<xsl:text>&#x222B;</xsl:text>
			</math:mo>
			<xsl:apply-templates select="om:OMBIND/*[3] | OMBIND/*[3]"/>
			<math:mo>
				<!-- U+2146 double-struck italic small d &DifferentialD; -->
				<xsl:text>&#x2146;</xsl:text>
			</math:mo>
			<xsl:apply-templates select="om:OMBIND/*[2] | OMBIND/*[2]"/>
		</math:mrow>
	</xsl:template>

	<!-- ********************************************************************

       calculus3

       ******************************************************************** -->
	<xsl:template match="OMA[OMS[@name='diff_quot' and @cd='calculus3']]| om:OMA[om:OMS[@name='diff_quot' and @cd='calculus3']]">
		<xsl:choose>
			<xsl:when test="@style='uneval' and @lambda='t'">
				<math:mrow>
					<math:mtable rowlines="solid">
						<math:mtr>
							<math:mtd>
								<xsl:text>&#x394;</xsl:text>
								<!-- U+0394 greek capital delta -->
								<xsl:apply-templates select="*[2]"/>
							</math:mtd>
						</math:mtr>
						<math:mtr>
							<math:mtd>
								<xsl:text>&#x394;</xsl:text>
								<!-- U+0394 greek capital delta -->
								<math:mi>t</math:mi>
							</math:mtd>
						</math:mtr>
					</math:mtable>
				</math:mrow>
			</xsl:when>
			<xsl:when test="@style='uneval'">
				<math:mrow>
					<math:mtable rowlines="solid">
						<math:mtr>
							<math:mtd>
								<xsl:text>&#x394;</xsl:text>
								<!-- U+0394 greek capital delta -->
								<xsl:apply-templates select="*[2]"/>
							</math:mtd>
						</math:mtr>
						<math:mtr>
							<math:mtd>
								<xsl:text>&#x394;</xsl:text>
								<!-- U+0394 greek capital delta -->
								<math:mi>
									<xsl:text>x</xsl:text>
								</math:mi>
							</math:mtd>
						</math:mtr>
					</math:mtable>
				</math:mrow>
			</xsl:when>
			<xsl:when test="@lambda='t'">
				<math:mrow>
					<math:mfrac>
						<math:mrow>&#x394;<xsl:apply-templates select="*[2]"/></math:mrow>
						<math:mi>&#x394; t</math:mi>
					</math:mfrac>
					<math:mo>(</math:mo>
					<xsl:apply-templates select="*[3]"/>,
					<xsl:apply-templates select="*[4]"/>
					<math:mo>)</math:mo>
				</math:mrow>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>
					<math:mfrac>
						<math:mrow>
							<xsl:text>&#x394;</xsl:text>
							<xsl:apply-templates select="*[2]"/>
						</math:mrow>
						<xsl:text>&#x394;</xsl:text>
						<math:mi>x</math:mi>
					</math:mfrac>
					<math:mo>(</math:mo>
					<xsl:apply-templates select="*[3]"/>,
					<xsl:apply-templates select="*[4]"/>
					<math:mo>)</math:mo>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>


	<xsl:template match="OMA[OMS[@name='difference' and @cd='calculus3']]| om:OMA[om:OMS[@name='difference' and @cd='calculus3']]">
		<xsl:choose>
			<xsl:when test="@style='uneval'">
				<math:mrow>
					<math:mo>
						<xsl:text>&#x394;</xsl:text>
					</math:mo>
					<!-- 916 = U+0394 Greek capital delta -->
					<xsl:apply-templates select="*[2]"/>
				</math:mrow>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>
					<math:mo>
						<xsl:text>&#x394;</xsl:text>
						<!-- 916 = U+0394 Greek capital delta -->
					</math:mo>
					<xsl:apply-templates select="*[2]"/>
					<math:mo>
						<xsl:text>(</xsl:text>
					</math:mo>
					<xsl:apply-templates select="*[3]"/>
					<math:mo>
						<xsl:text>,</xsl:text>
					</math:mo>
					<xsl:apply-templates select="*[4]"/>
					<math:mo>
						<xsl:text>)</xsl:text>
					</math:mo>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<!-- ********************************************************************

       combinat1

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@name='binomial' and @cd='combinat1']]|OMA[OMS[@name='binomial' and @cd='combinat1']]">
		<math:mrow>
			<math:mo>(</math:mo>
			<math:mtable>
				<math:mtr>
					<math:mtd>
						<xsl:apply-templates select="*[2]"/>
					</math:mtd>
				</math:mtr>
				<math:mtr>
					<math:mtd>
						<xsl:apply-templates select="*[3]"/>
					</math:mtd>
				</math:mtr>
			</math:mtable>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<!-- ********************************************************************

       field3

       ******************************************************************** -->


	<xsl:template match="om:OMA[om:OMS[@cd='field3' and @name='fraction_field']]|OMA[OMS[@cd='field3' and @name='fraction_field']]">
		<math:mrow>
			<math:mi>Q</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@cd='field3' and @name='free_field']]|OMA[OMS[@cd='field3' and @name='free_field']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[3]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<!-- ********************************************************************

       fns1

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@cd='fns1' and @name='image']]|OMA[OMS[@cd='fns1' and @name='image']]">
		<math:mrow>
			<math:mi>Im</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='fns1' and @name='inverse']]|OMA[OMS[@cd='fns1' and @name='inverse']]">
		<math:mrow>
			<math:msup>
				<xsl:apply-templates select="*[2]"/>
				<math:mrow>
					<math:mo>-</math:mo>
					<math:mn>1</math:mn>
				</math:mrow>
			</math:msup>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMBIND[om:OMS[@cd='fns1' and @name='lambda']]|OMBIND[OMS[@cd='fns1' and @name='lambda']]">
		<math:mrow>
			<math:mfenced open="" close="" separator=",">
				<xsl:for-each select="om:OMBVAR/*|OMBVAR/*">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
			</math:mfenced>
			<math:mo>&#x21A6;</math:mo>
			<math:mrow>
				<xsl:apply-templates select="*[3]"/>
			</math:mrow>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@name='left_compose']]|OMA[OMS[@name='left_compose']]">
		<xsl:choose>
			<xsl:when test="@style='brackets'">
				<math:mrow>
					<math:mo>(</math:mo>
					<math:mrow>
						<xsl:for-each select="*[position()&gt;1]">
							<xsl:apply-templates select="."/>
							<xsl:if test="position() &lt; last()">
								<math:mo>&#x2218;</math:mo>
							</xsl:if>
						</xsl:for-each>
					</math:mrow>
					<math:mo>)</math:mo>
				</math:mrow>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>
					<xsl:for-each select="*[position()&gt;1]">
						<xsl:apply-templates select="."/>
						<xsl:if test="position() &lt; last()">
							<math:mo>&#x2218;</math:mo>
						</xsl:if>
					</xsl:for-each>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>


	<xsl:template match="om:OMS[@name='left_compose']|OMS[@name='left_compose']">
		<math:mo>&#x2218;</math:mo>
	</xsl:template>




	<!-- ********************************************************************

       fns2

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@name='kernel']]|OMA[OMS[@name='kernel']]">
		<math:mrow>
			<math:mi>Ker</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='fns2' and @name='apply_to_list']]|OMA[OMS[@cd='fns2' and @name='apply_to_list']]">
		<math:mrow>
			<math:mi>TODO</math:mi>
			<xsl:choose>
				<xsl:when test="om:OMA|OMA">
					<math:mrow>
						<xsl:apply-templates select="*[1]"/>
					</math:mrow>
					<math:mfenced separator=",">
						<xsl:attribute name="open">(</xsl:attribute>
						<xsl:attribute name="close">)</xsl:attribute>
						<math:mrow>
							<xsl:apply-templates select="*[2]"/>
						</math:mrow>
						<math:mrow>
							<xsl:apply-templates select="*[3]"/>
						</math:mrow>
					</math:mfenced>
				</xsl:when>
				<xsl:otherwise>
					<math:mfenced separator=",">
						<xsl:attribute name="open">{</xsl:attribute>
						<xsl:attribute name="close">}</xsl:attribute>
						<math:mrow>
							<xsl:apply-templates select="*[2]"/>
						</math:mrow>
						<math:mrow>
							<xsl:apply-templates select="*[3]"/>
						</math:mrow>
					</math:mfenced>
				</xsl:otherwise>
			</xsl:choose>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='right_compose']]|OMA[OMS[@name='right_compose']]">
		<xsl:choose>
			<xsl:when test="@style='brackets'">
				<math:mrow>
					<math:mo>(</math:mo>
					<math:mrow>
						<xsl:for-each select="*[position()&gt;1]">
							<xsl:apply-templates select="."/>
							<xsl:if test="position() &lt; last()">
								<math:mo>&#x2022;</math:mo>
							</xsl:if>
						</xsl:for-each>
					</math:mrow>
					<math:mo>)</math:mo>
				</math:mrow>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>
					<xsl:for-each select="*[position()&gt;1]">
						<xsl:apply-templates select="."/>
						<xsl:if test="position() &lt; last()">
							<math:mo>&#x2022;</math:mo>
						</xsl:if>
					</xsl:for-each>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>



	<!-- ********************************************************************

       fns3

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@cd='fns3' and @name='function']]|OMA[OMS[@cd='fns3' and @name='function']]">
		<xsl:choose>
			<xsl:when test="*[4]">
				<math:mrow>
					<xsl:apply-templates select="*[2]"/>
					<math:mo>&#x2192;</math:mo>
					<xsl:apply-templates select="*[3]"/>
					<math:mo>,</math:mo>
					<xsl:apply-templates select="*[4]"/>
				</math:mrow>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>
					<xsl:apply-templates select="*[2]"/>
					<math:mo>&#x2192;</math:mo>
					<xsl:apply-templates select="*[3]"/>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='fns3' and @name='mapsto']]|OMA[OMS[@cd='fns3' and @name='mapsto']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>&#x27FC;</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='fns3' and @name='restriction']]|OMA[OMS[@cd='fns3' and @name='restriction']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>&#x2193;</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<!-- ********************************************************************

       fns4

       ******************************************************************** -->

	<xsl:template match="om:OMBIND[om:OMS[@cd='fns4' and @name='maps_to']]|OMBIND[OMS[@cd='fns4' and @name='maps_to']]">
		<math:mrow>
			<xsl:apply-templates select="*[3]"/>
			<math:mo>&#x21A6;</math:mo>
			<xsl:apply-templates select="*[4]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='fns4' and  @name='assign_to']]|OMA[OMS[@cd='fns4' and  @name='assign_to']]">
		<!-- new version {1,3,...} -> {2,4,...} -->
		<math:mrow>
			<xsl:choose>
				<xsl:when test="*[4]">
					<!-- more than 2 arguments -->
					<math:mfenced open="{{" close="}}" separator=",">
						<xsl:for-each select="*[position() mod 2 = 0]">
							<xsl:apply-templates select="."/>
						</xsl:for-each>
					</math:mfenced>
					<math:mo>&#x21A6;</math:mo>
					<math:mfenced open="{{" close="}}" separator=",">
						<xsl:for-each select="*[position() mod 2 = 1]">
							<xsl:if test="position()&gt;1">
								<xsl:apply-templates select="."/>
							</xsl:if>
						</xsl:for-each>
					</math:mfenced>
				</xsl:when>
				<xsl:otherwise>
					<xsl:apply-templates select="*[2]"/>
					<math:mo>&#x21A6;</math:mo>
					<xsl:apply-templates select="*[3]"/>
				</xsl:otherwise>
			</xsl:choose>
		</math:mrow>
		<!-- old version 1->2, 3->4, ...
      <xsl:for-each select="*[position()>1]">
        <!- - warning: in this loop position 1 means the first argument - ->
        <xsl:if test="position() > 1">
          <xsl:choose>
            <xsl:when test="position() mod 2 = 0">
              <math:mo>&#x021a6;</math:mo>
            </xsl:when>
            <xsl:when test="position() mod 2 = 1">
              <xsl:text disable-output-escaping = "yes">&lt;/math:mrow&gt;
                <math:mo>,</math:mo>
                &lt;math:mrow&gt;
              </xsl:text>
            </xsl:when>
          </xsl:choose>
        </xsl:if>
        <xsl:apply-templates select="."/>
      </xsl:for-each>
      -->
	</xsl:template>



	<!-- ********************************************************************

       graph1

       ******************************************************************** -->


	<xsl:template match="om:OMA[om:OMS[@cd='graph1' and @name='graph']]|OMA[OMS[@cd='graph1' and @name='graph']]">
		<math:mrow>
			<math:mo>(</math:mo>
			<math:mfenced open="" close="" separator=",">
				<xsl:for-each select="*[position()&gt;1]">
					<math:mrow>
						<xsl:apply-templates select="."/>
					</math:mrow>
				</xsl:for-each>
			</math:mfenced>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>



	<!-- ********************************************************************

       group1

       ******************************************************************** -->


	<xsl:template match="om:OMA[om:OMS[@name='carrier']]|OMA[OMS[@name='carrier']]">
		<xsl:choose>
			<xsl:when test="om:OMA[om:OMS[@name='monoid' or @name='group']]|OMA[OMS[@name='monoid' or @name='group']]">
				<math:mrow>
					<xsl:apply-templates select="om:OMA/*[2]|OMA/*[2]"/>
				</math:mrow>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>
					<xsl:apply-templates select="*[2]"/>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@name='identity']]|OMA[OMS[@name='identity']]">
		<xsl:choose>
			<xsl:when test="om:OMA[om:OMS[@name='monoid' or @name='group']]|OMA[OMS[@name='monoid' or @name='group']]">
				<math:mrow>
					<xsl:apply-templates select="om:OMA/*[4]|OMA/*[4]"/>
				</math:mrow>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>
					<math:mo>1</math:mo>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@cd='group1' and @name='is_subgroup']]|OMA[OMS[@cd='group1' and @name='is_subgroup']]">
		<math:mrow>
			<xsl:apply-templates select="*[3]"/>
			<math:mo>&lt;</math:mo>
			<xsl:apply-templates select="*[2]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='left_cosets']]|OMA[OMS[@name='left_cosets']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mi>/</math:mi>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='group1' and @name='group']]|OMA[OMS[@cd='group1' and @name='group']]">
		<math:mfenced open="[" close="]" separator=",">
			<math:mrow>
				<xsl:apply-templates select="*[2]"/>
			</math:mrow>
			<math:mrow>
				<xsl:apply-templates select="*[3]"/>
			</math:mrow>
			<math:mrow>
				<xsl:apply-templates select="*[4]"/>
			</math:mrow>
			<math:mrow>
				<xsl:apply-templates select="*[5]"/>
			</math:mrow>
		</math:mfenced>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@name='right_cosets']]|OMA[OMS[@name='right_cosets']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mi>\\</math:mi>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='group1' and @name='multiplication']]|OMA[OMS[@cd='group1' and @name='multiplication']]">
		<xsl:for-each select="*[position()&gt;2]">
			<math:mrow>
				<xsl:apply-templates select="."/>
			</math:mrow>
		</xsl:for-each>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@name='right_cosets']]|OMA[OMS[@name='right_cosets']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mi>\\</math:mi>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@cd='group1' and @name='subgroup']]|OMA[OMS[@cd='group1' and @name='subgroup']]">
		<xsl:choose>
			<xsl:when test="*[3]">
				<math:msub>
					<math:mrow>
						<math:mo>&lt;</math:mo>
						<xsl:apply-templates select="*[2]"/>
						<math:mo>&gt;</math:mo>
					</math:mrow>
					<xsl:apply-templates select="*[3]"/>
				</math:msub>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>
					<math:mo>&lt;</math:mo>
					<xsl:apply-templates select="*[2]"/>
					<math:mo>&gt;</math:mo>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>



	<!-- ********************************************************************

       group2

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@name='automorphism_group']]|OMA[OMS[@name='automorphism_group']]">
		<math:mrow>
			<math:mo>Aut</math:mo>
			<math:mi>(</math:mi>
			<xsl:apply-templates select="*[2]"/>
			<math:mi>)</math:mi>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='left_multiplication']]|OMA[OMS[@name='left_multiplication']]">
		<math:msub>
			<math:mo>L</math:mo>
			<xsl:apply-templates select="*[2]"/>
		</math:msub>
	</xsl:template>

	<xsl:template match="om:OMS[@name='left_multiplication']|OMS[@name='left_multiplication']">
		<math:mo>L</math:mo>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='right_inverse_multiplication']]|OMA[OMS[@name='right_inverse_multiplication']]">
		<math:msub>
			<math:mo>R</math:mo>
			<xsl:apply-templates select="*[2]"/>
		</math:msub>
	</xsl:template>

	<xsl:template match="om:OMS[@name='right_inverse_multiplication']|OMS[@name='right_inverse_multiplication']">
		<math:mo>R</math:mo>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@cd='group2' and @name='conjugation']]|OMA[OMS[@cd='group2' and @name='conjugation']]">
		<math:msub>
			<math:mo>C</math:mo>
			<xsl:apply-templates select="*[2]"/>
		</math:msub>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='group2' and @name='conjugation']|OMS[@cd='group2' and @name='conjugation']">
		<math:mo>C</math:mo>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='isomorphic']]|OMA[OMS[@name='isomorphic']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>&#x2245;</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>



	<!-- ********************************************************************

       group3

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@cd='group3' and @name='center']]|OMA[OMS[@cd='group3' and @name='center']]">
		<math:mrow>
			<math:mi mathvariant="bold">Z</math:mi>
			<math:mi>(</math:mi>
			<xsl:apply-templates select="*[2]"/>
			<math:mi>)</math:mi>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='group3' and @name='centralizer']]|OMA[OMS[@cd='group3' and @name='centralizer']]">
		<math:mrow>
			<math:msub>
				<math:mo>C</math:mo>
				<xsl:apply-templates select="*[2]"/>
			</math:msub>
			<math:mi>(</math:mi>
			<xsl:apply-templates select="*[3]"/>
			<math:mi>)</math:mi>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@cd='group3' and @name='normalizer']]|OMA[OMS[@cd='group3' and @name='normalizer']]">
		<math:mrow>
			<math:msub>
				<math:mo>N</math:mo>
				<xsl:apply-templates select="*[2]"/>
			</math:msub>
			<math:mi>(</math:mi>
			<xsl:apply-templates select="*[3]"/>
			<math:mi>)</math:mi>
		</math:mrow>
	</xsl:template>



	<xsl:template match="om:OMA[om:OMS[@cd='group3' and @name='GLn']]|OMA[OMS[@cd='group3' and @name='GLn']]">
		<math:mrow>
			<math:mo>GL</math:mo>
			<math:mi>(</math:mi>
			<xsl:apply-templates select="*[2]"/>
			<math:mi>,</math:mi>
			<xsl:apply-templates select="*[3]"/>
			<math:mi>)</math:mi>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='group3' and @name='SLn']]|OMA[OMS[@cd='group3' and @name='SLn']]">
		<math:mrow>
			<math:mo>SL</math:mo>
			<math:mi>(</math:mi>
			<xsl:apply-templates select="*[2]"/>
			<math:mi>,</math:mi>
			<xsl:apply-templates select="*[3]"/>
			<math:mi>)</math:mi>
		</math:mrow>
	</xsl:template>



	<xsl:template match="om:OMA[om:OMS[@name='direct_power']]|OMA[OMS[@name='direct_power']]">
		<math:msup>
			<math:mrow>
				<xsl:choose>
					<xsl:when test="om:OMA|OMA">
						<xsl:apply-templates select="*[2]"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:apply-templates select="*[2]"/>
					</xsl:otherwise>
				</xsl:choose>
			</math:mrow>
			<math:mrow>
				<xsl:apply-templates select="*[3]"/>
			</math:mrow>
		</math:msup>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='direct_product']]|OMA[OMS[@name='direct_product']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<xsl:for-each select="*[position()&gt;2]">
				<math:mo>&#xD7;</math:mo>
				<xsl:apply-templates select="."/>
			</xsl:for-each>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='group3' and @name='quotient_group']]|OMA[OMS[@cd='group3' and @name='quotient_group']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>/</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@cd='group3' and @name='symmetric_group']]|OMA[OMS[@cd='group3' and @name='symmetric_group']]">
		<math:mrow>
			<math:mi>Sym</math:mi>
			<math:mi>(</math:mi>
			<xsl:apply-templates select="*[2]"/>
			<math:mi>)</math:mi>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@cd='group3' and @name='symmetric_groupn']]|OMA[OMS[@cd='group3' and @name='symmetric_groupn']]">
		<math:mrow>
			<math:msub>
				<math:mi>Sym</math:mi>
				<xsl:apply-templates select="*[2]"/>
			</math:msub>
		</math:mrow>
	</xsl:template>



	<xsl:template match="om:OMA[om:OMS[@cd='group3' and @name='free_group']]|OMA[OMS[@cd='group3' and @name='free_group']]">
		<math:mrow>
			<math:mo>&lt;</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<xsl:for-each select="*[position()&gt;2]">
				<math:mo>,</math:mo>
				<xsl:apply-templates select="."/>
			</xsl:for-each>
			<math:mo>&gt;</math:mo>
		</math:mrow>
	</xsl:template>

	<!-- ********************************************************************

       groupname1

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@name='cyclic_group']]|OMA[OMS[@name='cyclic_group']]">
		<math:mrow>
			<math:msub>
				<math:mi>C</math:mi>
				<xsl:apply-templates select="*[2]"/>
			</math:msub>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='groupname1' and @name='dihedral_group']]|OMA[OMS[@cd='groupname1' and @name='dihedral_group']]">
		<math:mrow>
			<math:msub>
				<math:mi>D</math:mi>
				<xsl:apply-templates select="*[2]"/>
			</math:msub>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='groupname1' and @name='quaternion_group']|OMS[@cd='groupname1' and @name='quaternion_group']">
		<math:msub>
			<math:mi>Q</math:mi>
			<math:mi>8</math:mi>
		</math:msub>
	</xsl:template>



	<!-- ********************************************************************

       groupname2

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@cd='groupname2' and @name='generalized_quaternion_group']]|OMA[OMS[@cd='groupname2' and @name='generalized_quaternion_group']]">
		<math:mrow>
			<math:msub>
				<math:mi>Q</math:mi>
				<xsl:apply-templates select="*[2]"/>
			</math:msub>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='groupname2' and @name='Sp']]|OMA[OMS[@cd='groupname2' and @name='Sp']]">
		<math:mrow>
			<math:mi>Sp(</math:mi>
			<xsl:apply-templates select="*[2]"/>
			<math:mi>)</math:mi>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='groupname2' and @name='orthogonal_groupn']]|OMA[OMS[@cd='groupname2' and @name='orthogonal_groupn']]">
		<math:mrow>
			<math:mi>O(</math:mi>
			<xsl:apply-templates select="*[2]"/>
			<math:mi>,</math:mi>
			<xsl:apply-templates select="*[3]"/>
			<math:mi>)</math:mi>
		</math:mrow>
	</xsl:template>


	<!-- ********************************************************************

       integer1

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@name='factorof' and @cd='integer1']]|OMA[OMS[@name='factorof' and @cd='integer1']]">
		<math:apply>
			<math:factorof/>
			<xsl:apply-templates select="*[2]"/>
			<xsl:apply-templates select="*[3]"/>
		</math:apply>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='integer1' and @name='factorial']]|OMA[OMS[@cd='integer1' and @name='factorial']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>!</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='integer1' and @name='quotient']|OMS[@cd='integer1' and @name='quotient']">
		<math:mrow>
			<math:mi>quotient</math:mi>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='integer1' and @name='quotient']]|OMA[OMS[@cd='integer1' and @name='quotient']]">
		<math:mrow>
			<math:mi>quot</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>,</math:mo>
			<xsl:apply-templates select="*[3]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='integer1' and @name='remainder']|OMS[@cd='integer1' and @name='remainder']">
		<math:mrow>
			<math:mi>remainder</math:mi>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='integer1' and @name='remainder']]|OMA[OMS[@cd='integer1' and @name='remainder']]">
		<math:mrow>
			<math:mi>rem</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>,</math:mo>
			<xsl:apply-templates select="*[3]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<!-- *******************************************************************

       integer2

       ******************************************************************* -->

	<xsl:template match="om:OMA[om:OMS[@name='class' and @cd='integer2']]|OMA[OMS[@name='class' and @cd='integer2']]">
		<math:mrow>
			<math:mrow>
				<xsl:apply-templates select="*[2]"/>
			</math:mrow>
			<math:mrow>
				<math:mo>
					<xsl:text>(</xsl:text>
				</math:mo>
				<math:mtext>
					<xsl:text>mod</xsl:text>
				</math:mtext>
				<math:mo>
					<xsl:text>&#xA0;</xsl:text>
					<!-- U+00A0 no-break space -->
				</math:mo>
				<xsl:apply-templates select="*[3]"/>
				<math:mo>
					<xsl:text>)</xsl:text>
				</math:mo>
			</math:mrow>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='divides' and @cd='integer2']]|OMA[OMS[@name='divides' and @cd='integer2']]">
		<math:mrow>
			<math:apply>
				<math:factorof/>
				<xsl:apply-templates select="*[2]"/>
				<xsl:apply-templates select="*[3]"/>
			</math:apply>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@name='euler' and @cd='integer2']|OMS[@name='euler' and @cd='integer2']">
		<math:mrow>
			<xsl:text>&#x3A6;</xsl:text>
			<!-- U+03A6 greek capital letter phi -->
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='euler' and @cd='integer2']]|OMA[OMS[@name='euler' and @cd='integer2']]">
		<math:mrow>
			<xsl:text>&#x3A6;(</xsl:text>
			<!-- U+03A6 greek capital letter phi -->
			<xsl:apply-templates select="*[2]"/>
			<xsl:text>)</xsl:text>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='eqmod']]|OMA[OMS[@name='eqmod']]">
		<math:mrow>
			<math:mrow>
				<xsl:apply-templates select="*[2]"/>
			</math:mrow>
			<math:mrow>
				<xsl:text>&#x2261;</xsl:text>
				<!-- U+2261 identical to -->
			</math:mrow>
			<math:mrow>
				<xsl:apply-templates select="*[3]"/>
			</math:mrow>
			<math:mrow>
				<math:mo>
					<xsl:text>&#xA0;(</xsl:text>
					<!-- U+00A0 no-break space -->
				</math:mo>
				<math:mtext>
					<xsl:text>mod</xsl:text>
				</math:mtext>
				<math:mo>
					<xsl:text>&#xA0;</xsl:text>
					<!-- U+00A0 no-break space -->
				</math:mo>
			</math:mrow>
			<math:mrow>
				<xsl:apply-templates select="*[4]"/>
				<math:mo>
					<xsl:text>)</xsl:text>
				</math:mo>
			</math:mrow>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='modulo_relation' and @cd='integer2']]|OMA[OMS[@name='modulo_relation' and @cd='integer2']]">
		<math:mrow>
			<math:mtext>
				<xsl:text>mod</xsl:text>
			</math:mtext>
			<math:mo>
				<xsl:text>&#xA0;</xsl:text>
				<!-- U+00A0 no-break space -->
			</math:mo>
			<xsl:apply-templates select="*[2]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='integer2' and @name='ord']]|OMA[OMS[@cd='integer2' and @name='ord']]">
		<math:mrow>
			<math:msub>
				<math:mi>
					<xsl:text>ord</xsl:text>
				</math:mi>
				<math:mrow>
					<xsl:apply-templates select="*[2]"/>
				</math:mrow>
			</math:msub>
			<xsl:text>(</xsl:text>
			<xsl:apply-templates select="*[3]"/>
			<xsl:text>)</xsl:text>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='neqmod' and @cd='integer2']]|OMA[OMS[@name='neqmod' and @cd='integer2']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>
				<xsl:text>&#x2262;</xsl:text>
				<!-- 8802 = U+2262 not identical to (3 lines) -->
			</math:mo>
			<xsl:apply-templates select="*[3]"/>
			<math:mo>
				<xsl:text>&#xA0;(</xsl:text>
				<!-- U+00A0 no-break space -->
			</math:mo>
			<math:mtext>
				<xsl:text>mod</xsl:text>
			</math:mtext>
			<math:mo>
				<xsl:text>&#xA0;</xsl:text>
				<!-- U+00A0 no-break space -->
			</math:mo>
			<xsl:apply-templates select="*[4]"/>
			<math:mo>
				<xsl:text>)</xsl:text>
			</math:mo>
		</math:mrow>
	</xsl:template>

	<!-- *******************************************************************

       interval1 (partial implementation)

       ******************************************************************* -->

	<xsl:template match="om:OMA[om:OMS[@name='interval_cc' and @cd='interval1']]|OMA[OMS[@name='interval_cc' and @cd='interval1']]">
		<math:mrow>
			<math:mfenced open="[" close="]" separator=",">
				<math:mrow>
					<xsl:apply-templates select="*[2]"/>
				</math:mrow>
				<math:mrow>
					<xsl:apply-templates select="*[3]"/>
				</math:mrow>
			</math:mfenced>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='interval_oo' and @cd='interval1']]|OMA[OMS[@name='interval_oo' and @cd='interval1']]">
		<math:mrow>
			<math:mfenced open="(" close=")" separator=",">
				<math:mrow>
					<xsl:apply-templates select="*[2]"/>
				</math:mrow>
				<math:mrow>
					<xsl:apply-templates select="*[3]"/>
				</math:mrow>
			</math:mfenced>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@name='interval_co' and @cd='interval1']]|OMA[OMS[@name='interval_co' and @cd='interval1']]">
		<math:mrow>
			<math:mfenced open="[" close=")" separator=",">
				<math:mrow>
					<xsl:apply-templates select="*[2]"/>
				</math:mrow>
				<math:mrow>
					<xsl:apply-templates select="*[3]"/>
				</math:mrow>
			</math:mfenced>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@name='interval_oc' and @cd='interval1']]|OMA[OMS[@name='interval_oc' and @cd='interval1']]">
		<math:mrow>
			<math:mfenced open="(" close="]" separator=",">
				<math:mrow>
					<xsl:apply-templates select="*[2]"/>
				</math:mrow>
				<math:mrow>
					<xsl:apply-templates select="*[3]"/>
				</math:mrow>
			</math:mfenced>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@cd='interval1' and @name='integer_interval']]|OMA[OMS[@cd='interval1' and @name='integer_interval']]">
		<math:mrow>
			<math:mfenced separator=",">
				<xsl:attribute name="open">{</xsl:attribute>
				<xsl:attribute name="close">}</xsl:attribute>
				<math:mrow>
					<xsl:apply-templates select="*[2]"/>
				</math:mrow>
				<math:mrow>
					<math:mi>...</math:mi>
				</math:mrow>
				<math:mrow>
					<xsl:apply-templates select="*[3]"/>
				</math:mrow>
			</math:mfenced>
		</math:mrow>
	</xsl:template>

	<!-- ********************************************************************

       limit1 (partial implementation)

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@cd='limit1' and @name='limit']]|OMA[OMS[@cd='limit1' and @name='limit']]">
		<math:mrow>
			<math:munder>
				<math:mi>
					<xsl:text>lim</xsl:text>
				</math:mi>
				<math:mrow>
					<xsl:apply-templates select="om:OMBIND/om:OMBVAR|OMBIND/OMBVAR"/>
					<math:mo>&#x2192;</math:mo>
					<xsl:choose>
						<xsl:when test="om:OMS[@cd='limit1' and @name='above']|OMS[@cd='limit1' and @name='above']">
							<math:msup>
								<xsl:apply-templates select="*[2]"/>
								<math:mo>+</math:mo>
							</math:msup>
						</xsl:when>
						<xsl:when test="om:OMS[@cd='limit1' and @name='below']|OMS[@cd='limit1' and @name='below']">
							<math:msup>
								<xsl:apply-templates select="*[2]"/>
								<math:mo>-</math:mo>
							</math:msup>
						</xsl:when>
						<xsl:otherwise>
							<xsl:apply-templates select="*[2]"/>
						</xsl:otherwise>
					</xsl:choose>
				</math:mrow>
			</math:munder>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="om:OMBIND/*[3]|OMBIND/*[3]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<!-- ********************************************************************

       linalg1 (TODO: check completeness)

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@name='transpose' and @cd='linalg1']]|OMA[OMS[@name='transpose' and @cd='linalg1']]">
		<math:msup>
			<xsl:apply-templates select="*[2]"/>
			<math:mi>T</math:mi>
		</math:msup>
	</xsl:template>


	<!--
<xsl:template match="OMS[@cd='linalg1'  and @name='determinant']" >
 <math:mrow>
  <math:mi>det</math:mi>
  <math:mfenced>
  <xsl:apply-templates select="following-sibling::*"/>
  </math:mfenced>
 </math:mrow>
</xsl:template>
-->

	<xsl:template match="om:OMA[om:OMS[@cd='linalg1' and @name='determinant']]|OMA[OMS[@cd='linalg1' and @name='determinant']]">
		<math:mrow>
			<math:mi>det</math:mi>
			<math:mfenced>
				<xsl:apply-templates select="*[2]"/>
			</math:mfenced>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@cd='linalg1'  and @name='vector_selector']]|OMA[OMS[@cd='linalg1'  and @name='vector_selector']]">
		<math:msub>
			<xsl:apply-templates select="*[3]"/>
			<xsl:apply-templates select="*[2]"/>
		</math:msub>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='linalg1'  and @name='matrix_selector']]|OMA[OMS[@cd='linalg1'  and @name='matrix_selector']]">
		<math:msub>
			<xsl:apply-templates select="*[4]"/>
			<math:mrow>
				<xsl:apply-templates select="*[2]"/>
				<xsl:apply-templates select="*[3]"/>
			</math:mrow>
		</math:msub>
	</xsl:template>



	<!-- ********************************************************************

       linalg2

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@name='matrix' and @cd='linalg2']]|OMA[OMS[@name='matrix' and @cd='linalg2']]">
		<math:matrix>
			<xsl:for-each select="*[position()&gt;1]">
				<xsl:apply-templates select="."/>
			</xsl:for-each>
		</math:matrix>
	</xsl:template>

	<!--  
  <xsl:template match="om:OMA[om:OMS[@name='matrix' and @cd='linalg2']]|OMA[OMS[@name='matrix' and @cd='linalg2']]">
    <math:mrow>
      <math:mo>
        <xsl:text> ( </xsl:text>
      </math:mo>
      <math:mtable>
        <xsl:for-each select="*[position()&gt;1]">
          <xsl:apply-templates select="."/>
        </xsl:for-each>
      </math:mtable>
      <math:mo>
        <xsl:text> ) </xsl:text>
      </math:mo>
    </math:mrow>
  </xsl:template>
  -->

	<xsl:template match="om:OMA[om:OMS[@name='matrixrow' and @cd='linalg2']]|OMA[OMS[@name='matrixrow' and @cd='linalg2']]">
		<math:matrixrow>
			<xsl:for-each select="*[position()&gt;1]">
				<xsl:apply-templates select="."/>
			</xsl:for-each>
		</math:matrixrow>
	</xsl:template>

	<!--
  <xsl:template match="om:OMA[om:OMS[@name='matrixrow' and @cd='linalg2']]|OMA[OMS[@name='matrixrow' and @cd='linalg2']]">
    <math:mtr>
      <xsl:for-each select="*[position()&gt;1]">
        <math:mtd columnalign="center">
          <xsl:apply-templates select="."/>
        </math:mtd>
      </xsl:for-each>
    </math:mtr>
  </xsl:template>
  -->

	<xsl:template match="om:OMA[om:OMS[@name='vector' and @cd='linalg2']]|OMA[OMS[@name='vector' and @cd='linalg2']]">
		<math:mfenced open="(" close=")" separator=",">
			<xsl:for-each select="*[position()&gt;1]">
				<math:mrow>
					<xsl:apply-templates select="."/>
				</math:mrow>
			</xsl:for-each>
		</math:mfenced>
	</xsl:template>

	<!-- ********************************************************************

       linalg3

       ******************************************************************** -->

	<xsl:template match="OMA[OMS[@name='matrix' and @cd='linalg3']]|om:OMA[om:OMS[@name='matrix' and @cd='linalg3']]">
		<math:mfenced open="(" close=")" separator=",">
			<math:mtable>
				<xsl:for-each select="*[position()&gt;1]">
					<math:mrow>
						<math:mtd columnalign="center">
							<xsl:apply-templates select="."/>
						</math:mtd>
					</math:mrow>
				</xsl:for-each>
			</math:mtable>
		</math:mfenced>
	</xsl:template>

	<xsl:template match="OMA[OMS[@name='matrixcolumn' and @cd='linalg3']]|om:OMA[om:OMS[@name='matrixcolumn' and @cd='linalg3']]">
		<math:mtable>
			<xsl:for-each select="*[position()&gt;1]">
				<math:mtr>
					<math:mtd>
						<xsl:apply-templates select="."/>
					</math:mtd>
				</math:mtr>
			</xsl:for-each>
		</math:mtable>
	</xsl:template>

	<xsl:template match="OMA[OMS[@name='vector' and @cd='linalg3']]|om:OMA[om:OMS[@name='vector' and @cd='linalg3']]">
		<math:mfenced open="(" close=")" separator=",">
			<math:mtable>
				<xsl:for-each select="*[position()&gt;1]">
					<math:mtr>
						<math:mtd>
							<xsl:apply-templates select="."/>
						</math:mtd>
					</math:mtr>
				</xsl:for-each>
			</math:mtable>
		</math:mfenced>
	</xsl:template>


	<!-- ********************************************************************

       linalg6

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@name='matrix_tensor' and @cd='linalg6']]|OMA[OMS[@name='matrix_tensor' and @cd='linalg6']]">
		<math:mrow>
			<xsl:for-each select="*[position()&gt;1]">
				<xsl:apply-templates select="."/>
				<xsl:if test="position() &lt; last()">
					<math:mo>&#x2297;</math:mo>
				</xsl:if>
			</xsl:for-each>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='vector_tensor' and @cd='linalg6']]|OMA[OMS[@name='vector_tensor' and @cd='linalg6']]">
		<math:mrow>
			<xsl:for-each select="*[position()&gt;1]">
				<xsl:apply-templates select="."/>
				<xsl:if test="position() &lt; last()">
					<math:mo>&#x2297;</math:mo>
				</xsl:if>
			</xsl:for-each>
		</math:mrow>
	</xsl:template>


	<!-- ********************************************************************

       list1 (partial implementation)

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@name='list' and @cd='list1']]|OMA[OMS[@name='list' and @cd='list1']]">
		<math:mrow>
			<math:mfenced open="[" close="]" separator=",">
				<xsl:for-each select="*[position()&gt;1]">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
			</math:mfenced>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='list1' and @name='suchthat']]|OMA[OMS[@cd='list1' and @name='suchthat']]">
		<math:mo>[</math:mo>
		<xsl:for-each select="om:OMBIND/om:OMBVAR/*|OMBIND/OMBVAR/*">
			<xsl:apply-templates select="."/>
		</xsl:for-each>
		<math:mo>&#x2208;</math:mo>
		<xsl:apply-templates select="*[2]"/>
		<math:mo>
		</math:mo>
		<math:mo>|</math:mo>
		<math:mo>
		</math:mo>
		<xsl:apply-templates select="om:OMBIND/*[3]|OMBIND/*[3]"/>
		<math:mo>]</math:mo>
	</xsl:template>


	<!--TODO: implement map-->
	<!--xsl:template match="OMA[OMS[@name='map' and @cd='list1']]">
    <math:mrow>
      <math:mfenced open="[" close="]" separator=",">
        <xsl:for-each select="*[position()>1]">
          <xsl:apply-templates select="."/>
        </xsl:for-each>
      </math:mfenced>
    </math:mrow>
  </xsl:template-->



	<!-- ********************************************************************

       list3

       ******************************************************************** -->



	<xsl:template match="om:OMA[om:OMS[@name='append' and @cd='list3']]|OMA[OMS[@name='append' and @cd='list3']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>&#x222A;</math:mo>
			<math:mo>]</math:mo>
			<xsl:apply-templates select="*[3]"/>
			<math:mo>]</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='concatenate' and @cd='list3']]|OMA[OMS[@name='concatenate' and @cd='list3']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>&#x222A;</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>



	<xsl:template match="om:OMA[om:OMS[@name='length' and @cd='list3']]|OMA[OMS[@name='length' and @cd='list3']]">
		<math:mrow>
			<math:mo>Length</math:mo>
			<math:mi>(</math:mi>
			<xsl:apply-templates select="*[2]"/>
			<math:mi>)</math:mi>
		</math:mrow>
	</xsl:template>

	<!--not a symbol in list3
<xsl:template match="OMA[OMS[@name='prepend' and @cd='list3']]">
    <math:mrow>
          <xsl:apply-templates select="*[3]"/><math:mo>&#x222A;</math:mo>  [<xsl:apply-templates select="*[2]"/>
</math:mrow>]
  </xsl:template>
-->

	<xsl:template match="om:OMA[om:OMS[@name='list_selector']]|OMA[OMS[@name='list_selector']]">
		<math:mrow>
			<math:msub>
				<xsl:apply-templates select="*[3]"/>
				<xsl:apply-templates select="*[2]"/>
			</math:msub>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@name='select']]|OMA[OMS[@name='select']]">
		<math:mrow>
			<math:msub>
				<xsl:apply-templates select="*[2]"/>
				<math:mo>{</math:mo>
				<xsl:apply-templates select="*[2]"/>
				<math:mo>}</math:mo>
			</math:msub>
		</math:mrow>
	</xsl:template>



	<xsl:template match="om:OMA[om:OMS[@cd='list3' and @name='in']]|OMA[OMS[@cd='list3' and @name='in']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>&#x2208;</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>


	<!-- ********************************************************************

       list4

       ******************************************************************** -->


	<xsl:template match="om:OMA[om:OMS[@name='entry' and @cd='list4']]|OMA[OMS[@name='entry' and @cd='list4']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>[<xsl:apply-templates select="*[3]"/>]</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@name='reverse' and @cd='list4']]|OMA[OMS[@name='reverse' and @cd='list4']]">
		<math:mrow>
			<math:mo>Reverse</math:mo>
			<math:mi>(</math:mi>
			<xsl:apply-templates select="*[2]"/>
			<math:mi>)</math:mi>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@name='difference' and @cd='list4']]|OMA[OMS[@name='difference' and @cd='list4']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mi>\</math:mi>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@name='list_of_lengthn' and @cd='list4']]|OMA[OMS[@name='list_of_lengthn' and @cd='list4']]">
		<math:mrow>
			<xsl:apply-templates select="*[3]"/>
			<math:mo>(of length</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<!--TODO: implement remove with a suchthat construct-->



	<!-- ********************************************************************

       logic1 version 3
       symbols: and, equivalent, false, implies, not, or, true, xor

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@cd='logic1' and @name='and']]|OMA[OMS[@cd='logic1' and @name='and']]">
		<math:mrow>
			<xsl:for-each select="*[position()&gt;1 and position() &lt; last()]">
				<math:mo>
					<xsl:text>(</xsl:text>
				</math:mo>
				<xsl:apply-templates select="."/>
				<math:mo>
					<xsl:text>)</xsl:text>
				</math:mo>
				<math:mo>
					<xsl:text>&#x2227;</xsl:text>
				</math:mo>
				<!-- 8743 = U+2227 logical and -->
			</xsl:for-each>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[last()]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='logic1' and @name='equivalent']]|OMA[OMS[@cd='logic1' and @name='equivalent']]">
		<math:mrow>
			<math:mo>
				<xsl:text>(</xsl:text>
			</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>
				<xsl:text>)</xsl:text>
			</math:mo>
			<math:mo>
				<!-- U+2261 identical to -->
				<xsl:text>&#x2261;</xsl:text>
			</math:mo>
			<math:mo>
				<xsl:text>(</xsl:text>
			</math:mo>
			<xsl:apply-templates select="*[3]"/>
			<math:mo>
				<xsl:text>)</xsl:text>
			</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='logic1' and @name='implies']]|OMA[OMS[@cd='logic1' and @name='implies']]">
		<math:mrow>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
			<math:mo>&#x21D2;</math:mo>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[3]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='logic1' and @name='or']]|OMA[OMS[@cd='logic1' and @name='or']]">
		<math:mrow>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
			<math:mo>&#x2228;</math:mo>
			<!-- 8744 = U+2228 logical or -->
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[3]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='logic1' and @name='not']]|OMA[OMS[@cd='logic1' and @name='not']]">
		<math:mrow>
			<xsl:choose>
				<xsl:when test="*[2]/self::om:OMBIND/om:OMS[position()=1 and @cd='quant1' and @name='exists']|*[2]/self::OMBIND/OMS[position()=1 and @cd='quant1' and @name='exists']">
					<math:mo>&#x2204;</math:mo>
					<math:mfenced open="" close="" separator=",">
						<xsl:for-each select="*[2]/om:OMBVAR/om:OMV|*[2]/OMBVAR/OMV">
							<xsl:apply-templates select="."/>
						</xsl:for-each>
					</math:mfenced>
					<math:mo>.</math:mo>
					<xsl:apply-templates select="*[2]/*[3]"/>
				</xsl:when>
				<xsl:when test="*[2]/self::om:OMA/om:OMS[position()=1 and @cd='logic1' and @name='implies']|*[2]/self::OMA/OMS[position()=1 and @cd='logic1' and @name='implies']">
					<math:mrow>
						<math:mo>(</math:mo>
						<xsl:apply-templates select="*[2]/*[2]"/>
						<math:mo>)</math:mo>
						<math:mo>&#x21CF;</math:mo>
						<math:mo>(</math:mo>
						<xsl:apply-templates select="*[2]/*[3]"/>
						<math:mo>)</math:mo>
					</math:mrow>
				</xsl:when>
				<xsl:when test="om:OMA|OMA">
					<math:mo>&#xAC;</math:mo>
					<math:mo>(</math:mo>
					<xsl:apply-templates select="om:OMA|OMA"/>
					<math:mo>)</math:mo>
				</xsl:when>
				<xsl:otherwise>
					<math:mo>&#xAC;</math:mo>
					<math:mo>(</math:mo>
					<xsl:apply-templates select="*[2]"/>
					<math:mo>)</math:mo>
				</xsl:otherwise>
			</xsl:choose>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='logic1' and @name='false']|OMS[@cd='logic1' and @name='false']">
		<math:mo>false</math:mo>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='logic1' and @name='true']|OMS[@cd='logic1' and @name='true']">
		<math:mo>true</math:mo>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='logic1' and @name='xor']]|OMA[OMS[@cd='logic1' and @name='xor']]">
		<math:mrow>
			<math:mo>
				<xsl:text>(</xsl:text>
			</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>
				<xsl:text>)</xsl:text>
			</math:mo>
			<math:mo>
				<!-- U+22BB xor -->
				<xsl:text>&#x22BB;</xsl:text>
			</math:mo>
			<math:mo>
				<xsl:text>(</xsl:text>
			</math:mo>
			<xsl:apply-templates select="*[3]"/>
			<math:mo>
				<xsl:text>)</xsl:text>
			</math:mo>
		</math:mrow>
	</xsl:template>

	<!-- *******************************************************************

       minmax1

       ******************************************************************* -->


	<xsl:template match="om:OMA[om:OMS[@cd='minmax1' and @name='max']]|OMA[OMS[@cd='minmax1' and @name='max']]">
		<math:mrow>
			<math:mrow>max</math:mrow>
			<math:mfenced open="(" close=")" separator=",">
				<xsl:for-each select="*[position()&gt;1]">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
			</math:mfenced>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='minmax1' and @name='min']]|OMA[OMS[@cd='minmax1' and @name='min']]">
		<math:mrow>
			<math:mrow>min</math:mrow>
			<math:mfenced open="(" close=")" separator=",">
				<xsl:for-each select="*[position()&gt;1]">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
			</math:mfenced>
		</math:mrow>
	</xsl:template>

	<!-- *******************************************************************

       monoid1

       ******************************************************************* -->


	<xsl:template match="om:OMA[om:OMS[@name='identity']]|OMA[OMS[@name='identity']]">
		<math:msub>
			<math:mi>1</math:mi>
			<xsl:apply-templates select="*[2]"/>
		</math:msub>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@name='invertibles']]|OMA[OMS[@name='invertibles']]">
		<math:msup>
			<math:mfenced open="(" close=")" separator=",">
				<xsl:apply-templates select="*[2]"/>
			</math:mfenced>
			<math:mo>&#xD7;</math:mo>
		</math:msup>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='monoid1' and @name='monoid']]|OMA[OMS[@cd='monoid1' and @name='monoid']]">
		<math:mrow>
			<math:mfenced open="[" close="]" separator=",">
				<xsl:for-each select="*[position()&gt;1]">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
			</math:mfenced>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='monoid1' and @name='submonoid']]|OMA[OMS[@cd='monoid1' and @name='submonoid']]">
		<math:msub>
			<math:mrow>
				<math:mo>&lt;</math:mo>
				<xsl:apply-templates select="*[3]"/>
				<math:mo>&gt;</math:mo>
			</math:mrow>
			<math:mi>
				<xsl:apply-templates select="*[2]"/>
			</math:mi>
		</math:msub>
	</xsl:template>


	<!-- ********************************************************************

       monoid3

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@cd='monoid3' and @name='cyclic_monoid']]|OMA[OMS[@cd='monoid3' and @name='cyclic_monoid']]">
		<math:msub>
			<math:mi>C</math:mi>
			<math:mfenced open="" close="" separator=",">
				<xsl:apply-templates select="*[2]"/>
				<xsl:apply-templates select="*[3]"/>
			</math:mfenced>
		</math:msub>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='monoid3' and @name='maps_monoid']]|OMA[OMS[@cd='monoid3' and @name='maps_monoid']]">
		<math:mrow>
			<math:mi>Maps</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@cd='monoid3' and @name='free_monoid']]|OMA[OMS[@cd='monoid3' and @name='free_monoid']]">
		<math:mrow>
			<math:mi>F</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@cd='monoid3' and @name='strings']]|OMA[OMS[@cd='monoid3' and @name='strings']]">
		<math:mrow>
			<math:mi>Words</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='monoid3' and @name='emptyword']|OMS[@cd='monoid3' and @name='emptyword']">
		<math:mrow>
			<math:mo>&#x3F5;</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='monoid3' and @name='concatenation']|OMS[@cd='monoid3' and @name='concatenation']">
		<math:mo>
			<xsl:text>o</xsl:text>
		</math:mo>
	</xsl:template>

	<!-- ********************************************************************

       notation1

       ********************************************************************

  <xsl:template match="OMA[OMS[@cd='notation1' and @name='and']]">
    <math:mrow>
      <math:mfenced open="" close="" separator=",">
        <xsl:for-each select="*[position()>1]">
          <xsl:apply-templates select="."/>
        </xsl:for-each>
      </math:mfenced>
    </math:mrow>
  </xsl:template>

  <xsl:template match="OMA[OMS[@cd='notation1' and @name='chain_relation']]">
    <math:mrow>
      <xsl:for-each select="*[position()>1]">
        <xsl:apply-templates select="."/>
      </xsl:for-each>
    </math:mrow>
  </xsl:template>

  <xsl:template match="OMA[OMS[@cd='notation1' and @name='function']]">
    <math:mrow>
      <math:mi><xsl:value-of select="*[2]"/></math:mi>
      <math:mfenced open="(" close=")" separator=",">
        <xsl:for-each select="*[position()>2]">
          <xsl:apply-templates select="."/>
        </xsl:for-each>
      </math:mfenced>
    </math:mrow>
  </xsl:template>

  <xsl:template match="OMA[OMS[@cd='notation1' and @name='list']]">
    <math:mrow>
      <math:mfenced open="[" close="]" separator=",">
        <xsl:for-each select="*[position()>1]">
          <xsl:apply-templates select="."/>
        </xsl:for-each>
      </math:mfenced>
    </math:mrow>
  </xsl:template>

  <xsl:template match="OMA[OMS[@name='sequence']]">
    <math:mrow>
      <math:mfenced open="" close="" separator=",">
        <xsl:for-each select="*[position()>1]">
          <xsl:apply-templates select="."/>
        </xsl:for-each>
      </math:mfenced>
    </math:mrow>
  </xsl:template>

  <xsl:template match="OMA[OMS[@cd='notation1' and @name='similar']]">
    <math:mrow>
      <xsl:apply-templates select="*[2]"/>
      <math:mo>&#x223C;</math:mo>
      <xsl:apply-templates select="*[3]"/>
    </math:mrow>
  </xsl:template>

<xsl:template match="OMA[OMS[@cd='notation1' and @name='string']]">
    <math:mrow>
        <xsl:for-each select="*[position()>1]">
          <xsl:apply-templates select="."/>
        </xsl:for-each>
    </math:mrow>
  </xsl:template>

  <xsl:template
    match="OMA[OMS[@cd='notation1' and @name='in']]">
    <math:mrow>
      <xsl:apply-templates select="*[2]"/>
      <math:mo>&#x2208;</math:mo>
      <xsl:apply-templates select="*[3]"/>
    </math:mrow>
  </xsl:template>



  <xsl:template match="OMS[@cd='notation2' and @name='ldots']">
    <math:mo>...</math:mo>
  </xsl:template>
  -->
	<!-- ********************************************************************

       nums1

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@cd='nums1' and @name='based_integer']]|OMA[OMS[@cd='nums1' and @name='based_integer']]">
		<math:mrow>
			<math:msub>
				<math:mrow>[<xsl:apply-templates select="*[3]"/>]</math:mrow>
				<math:mrow>
					<xsl:apply-templates select="*[2]"/>
				</math:mrow>
			</math:msub>
		</math:mrow>
	</xsl:template>



	<xsl:template match="om:OMS[@cd='nums1' and @name='e']|OMS[@cd='nums1' and @name='e']">
		<math:mrow>
			<math:mi>e</math:mi>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMS[@cd='nums1' and @name='i']|OMS[@cd='nums1' and @name='i']">
		<math:mrow>
			<math:mo>&#x2148;</math:mo>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMS[@cd='nums1' and @name='infinity']|OMS[@cd='nums1' and @name='infinity']">
		<math:mrow>
			<math:mo>&#x221E;</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='nums1' and @name='pi']|OMS[@cd='nums1' and @name='pi']">
		<math:mrow>
			<math:mi>&#x3C0;</math:mi>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='nums1' and @name='rational']]|OMA[OMS[@cd='nums1' and @name='rational']]">
		<xsl:choose>
			<xsl:when test="@style='slash'">
				<math:mrow>
					<xsl:apply-templates select="*[2]"/>
					<math:mo>/</math:mo>
					<xsl:apply-templates select="*[3]"/>
				</math:mrow>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>
					<math:mfrac>
						<xsl:apply-templates select="*[2]"/>
						<xsl:apply-templates select="*[3]"/>
					</math:mfrac>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<!-- ********************************************************************

       permgp1

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@cd='permgp1' and @name='stabilizer']]|OMA[OMS[@cd='permgp1' and @name='stabilizer']]">
		<math:mrow>
			<math:msub>
				<xsl:apply-templates select="*[2]"/>
				<math:mfenced open="" close="" separator=",">
					<xsl:for-each select="*[position()&gt;2]">
						<xsl:apply-templates select="."/>
					</xsl:for-each>
				</math:mfenced>
			</math:msub>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='permgp1' and @name='orbit']]|OMA[OMS[@cd='permgp1' and @name='orbit']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='permgp1' and @name='generators']]|OMA[OMS[@cd='permgp1' and @name='generators']]">
		<math:mrow>
			<math:mo>Generators</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>



	<xsl:template match="om:OMA[om:OMS[@cd='permgp1' and @name='group']]|OMA[OMS[@cd='permgp1' and @name='group']]">
		<math:mrow>
			<math:mo>&lt;</math:mo>
			<math:mfenced open="" close="" separator=",">
				<xsl:for-each select="*[position()&gt;2]">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
			</math:mfenced>
			<math:mo>&gt;</math:mo>
		</math:mrow>
	</xsl:template>

	<!-- ********************************************************************

       permgp2

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@cd='permgp2' and @name='symmetric_group']]|OMA[OMS[@cd='permgp2' and @name='symmetric_group']]">
		<xsl:choose>
			<xsl:when test="@style='sub'">
				<math:mrow>
					<math:msub>
						<math:mi>Sym</math:mi>
						<xsl:apply-templates select="*[2]"/>
					</math:msub>
				</math:mrow>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>
					<math:mi>Sym</math:mi>
					<math:mi>(</math:mi>
					<xsl:apply-templates select="*[2]"/>
					<math:mi>)</math:mi>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='permgp2' and @name='dihedral_group']]|OMA[OMS[@cd='permgp2' and @name='dihedral_group']]">
		<math:mrow>
			<math:msub>
				<math:mi>D</math:mi>
				<xsl:apply-templates select="*[2]"/>
			</math:msub>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='permgp2' and @name='quaternion_group']]|OMA[OMS[@cd='permgp2' and @name='quaternion_group']]">
		<math:mrow>
			<math:msub>
				<math:mi>Q</math:mi>
				<xsl:apply-templates select="*[2]"/>
			</math:msub>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='alternating_group']]|OMA[OMS[@name='alternating_group']]">
		<math:mrow>
			<math:mi>Alt</math:mi>
			<math:mi>(</math:mi>
			<xsl:apply-templates select="*[2]"/>
			<math:mi>)</math:mi>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='alternating_groupn']]|OMA[OMS[@name='alternating_groupn']]">
		<math:msub>
			<math:mi>Alt</math:mi>
			<xsl:apply-templates select="*[2]"/>
		</math:msub>
	</xsl:template>

	<!-- *******************************************************************

       permutation1

       ******************************************************************* -->

	<xsl:template match="om:OMA[om:OMS[@cd='permutation1' and @name='action']]|OMA[OMS[@cd='permutation1' and @name='action']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mi>(</math:mi>
			<xsl:apply-templates select="*[3]"/>
			<math:mi>)</math:mi>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='permutation1' and @name='cycle']]|OMA[OMS[@cd='permutation1' and @name='cycle']]">
		<math:mrow>
			<math:mfenced open="(" close=")" separator=",">
				<xsl:for-each select="*[position()&gt;1]">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
			</math:mfenced>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='endomap' or @name='list_perm']]|OMA[OMS[@name='endomap' or @name='list_perm']]">
		<math:mrow>
			<math:mfenced open="[" close="]" separator=",">
				<xsl:for-each select="*[position()&gt;1]">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
			</math:mfenced>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@cd='permutation1' and @name='permutation']]|OMA[OMS[@cd='permutation1' and @name='permutation']]">
		<xsl:choose>
			<xsl:when test="*[position()=1]">
				<math:mrow>
					<xsl:for-each select="*[position()&gt;1]">
						<xsl:apply-templates select="."/>
					</xsl:for-each>
				</math:mrow>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>
					<math:mi>()</math:mi>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='permutation1' and @name='sign']]|OMA[OMS[@cd='permutation1' and @name='sign']]">
		<math:mrow>
			<math:mi>sg</math:mi>
			<math:mi>(</math:mi>
			<xsl:apply-templates select="*[2]"/>
			<math:mi>)</math:mi>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='permutation1' and @name='support']]|OMA[OMS[@cd='permutation1' and @name='support']]">
		<math:mrow>
			<math:mi>Support</math:mi>
			<math:mi>(</math:mi>
			<xsl:apply-templates select="*[2]"/>
			<math:mi>)</math:mi>
		</math:mrow>
	</xsl:template>

	<!-- *******************************************************************

       prog1

       ******************************************************************* -->

	<xsl:template match="om:OMA[om:OMS[@cd='prog1' and @name='assignment']]|OMA[OMS[@cd='prog1' and @name='assignment']]">
		<div class="assignment">
			<xsl:apply-templates select="*[2]"/>
			<math:mo>:=</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</div>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='prog1' and @name='arguments']]|OMA[OMS[@cd='prog1' and @name='arguments']]">Procedure<math:mfenced open="(" close=")" separator=",">
			<xsl:for-each select="*[position()&gt;1]">
				<xsl:apply-templates select="."/>
			</xsl:for-each></math:mfenced></xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='prog1' and @name='block']]|OMA[OMS[@cd='prog1' and @name='block']]">
		<div>
			<xsl:for-each select="*[position()&gt;1]">
				<xsl:apply-templates select="."/>
			</xsl:for-each>
		</div>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='prog1' and @name='for']]|OMA[OMS[@cd='prog1' and @name='for']]">
		<b>For</b>
		<div class="alg-block">
			<b>From</b>
			<br/>
			<div class="alg-block">
				<xsl:apply-templates select="*[2]"/>
			</div>

			<b>To</b>
			<br/>
			<div class="alg-block">
				<xsl:apply-templates select="*[3]"/>
			</div>

			<b>with stepsize</b>
			<br/>
			<div class="alg-block">
				<xsl:apply-templates select="*[4]"/>
			</div>

			<b>Do</b>
			<br/>
			<div class="alg-block">
				<xsl:apply-templates select="*[5]"/>
			</div>
		</div>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='prog1' and @name='function_block']]|OMA[OMS[@cd='prog1' and @name='function_block']]">
		<xsl:for-each select="*[position() &gt; 1]">
			<xsl:apply-templates select="."/>
		</xsl:for-each>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='prog1' and @name='function_definition']]|OMA[OMS[@cd='prog1' and @name='function_definition']]">
		<hr/>
		<b>
			<xsl:apply-templates select="*[2]"/>:=<xsl:apply-templates select="*[3]"/></b>
		<br/>

		<div class="alg-block">
			<xsl:apply-templates select="*[4]"/>
		</div>
		<br/>
		<hr/>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='prog1' and @name='procedure']]|OMA[OMS[@cd='prog1' and @name='procedure']]">
		<hr/>
		<b>
			<xsl:apply-templates select="*[2]"/>:=<xsl:apply-templates select="*[3]"/></b>
		<br/>

		<div class="alg-block">
			<xsl:apply-templates select="*[4]"/>
		</div>
		<br/>
		<hr/>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@cd='prog1' and @name='functioncall']]|OMA[OMS[@cd='prog1' and @name='functioncall']]">
		<xsl:apply-templates select="*[2]"/>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='prog1' and @name='global_var']]|OMA[OMS[@cd='prog1' and @name='global_var']]">
		<b>global variables</b>
		<br/>
		<div class="alg-block">
			<xsl:for-each select="*[position() &gt; 1]">
				<xsl:apply-templates select="."/>
			</xsl:for-each>
		</div>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@cd='prog1' and @name='if']]|OMA[OMS[@cd='prog1' and @name='if']]">
		<b>If</b>
		<br/>
		<div class="alg-block">
			<xsl:apply-templates select="*[2]"/>
			<br/>
			<br/>
			<b>Then</b>
			<br/>
			<div class="alg-block">
				<xsl:apply-templates select="*[3]"/>
			</div>
			<br/>
			<b>Else</b>
			<br/>
			<div class="alg-block">
				<xsl:apply-templates select="*[4]"/>
			</div>
		</div>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='prog1' and @name='local_var']]|OMA[OMS[@cd='prog1' and @name='local_var']]">
		<b>Local variables</b>
		<br/>
		<div class="alg-block">
			<xsl:for-each select="*[position() &gt; 1]">
				<div>
					<xsl:apply-templates select="."/>
				</div>
			</xsl:for-each>
			<br/>
		</div>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='prog1' and @name='local_vars']]|OMA[OMS[@cd='prog1' and @name='local_vars']]">
		<b>Local variables</b>
		<br/>
		<div class="alg-block">
			<xsl:for-each select="*[position() &gt; 1]">
				<div>
					<xsl:apply-templates select="."/>
				</div>
			</xsl:for-each>
			<br/>
		</div>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@cd='prog1' and @name='return']]|OMA[OMS[@cd='prog1' and @name='return']]">
		<b>Return</b>
		<br/>
		<div class="alg-block">
			<xsl:for-each select="*[position() &gt; 1]">
				<div>
					<xsl:apply-templates select="."/>
				</div>
			</xsl:for-each>
		</div>
	</xsl:template>



	<xsl:template match="om:OMA[om:OMS[@cd='prog1' and @name='while']]|OMA[OMS[@cd='prog1' and @name='while']]">
		<br/>
		<b>While</b>
		<div class="alg-block">

			<!--<b>Test</b><br/>-->
			<xsl:apply-templates select="*[2]"/>
			<br/>
			<b>Do</b>
			<br/>
			<div class="alg-block">
				<xsl:apply-templates select="*[3]"/>
			</div>
		</div>
		<br/>
	</xsl:template>

	<!-- *******************************************************************

       quant1

       ******************************************************************* -->

	<xsl:template match="om:OMBIND[om:OMS[@cd='quant1' and @name='forall']]|OMBIND[OMS[@cd='quant1' and @name='forall']]">
		<math:mrow>
			<math:mo>&#x2200;</math:mo>
			<math:mfenced open="" close="." separator=",">
				<xsl:for-each select="om:OMBVAR/om:OMV|OMBVAR/OMV">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
			</math:mfenced>
			<math:mi>
			</math:mi>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMBIND[om:OMS[@cd='quant1' and @name='exists']]|OMBIND[OMS[@cd='quant1' and @name='exists']]">
		<math:mrow>
			<math:mo>&#x2203;</math:mo>
			<math:mfenced open="" close="." separator=",">
				<xsl:for-each select="om:OMBVAR/om:OMV|OMBVAR/OMV">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
			</math:mfenced>
			<math:mi>
			</math:mi>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>


	<!-- ********************************************************************

       polyd1

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@cd='polyd1' and @name='poly_ring_d_named']]|OMA[OMS[@cd='polyd1' and @name='poly_ring_d_named']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>[</math:mo>
			<xsl:for-each select="*[position()&gt;2]">
				<xsl:apply-templates select="."/>
				<xsl:if test="position() &lt; last()">
					<math:mo>,</math:mo>
				</xsl:if>
			</xsl:for-each>
			<math:mo>]</math:mo>
		</math:mrow>
	</xsl:template>


	<!-- ********************************************************************

       polynomial1

       ******************************************************************** -->

	<!--
    coefficient
  -->
	<xsl:template match="om:OMS[@cd='polynomial1' and @name='coefficient'] |     OMS[@cd='polynomial1' and @name='coefficient']">
		<math:mrow>
			<math:mtext>
				<xsl:text>coefficient</xsl:text>
			</math:mtext>
		</math:mrow>
	</xsl:template>

	<!--
    coefficient_ring
  -->
	<xsl:template match="om:OMS[@cd='polynomial1' and @name='coefficient_ring'] |     OMS[@cd='polynomial1' and @name='coefficient_ring']">
		<math:mrow>
			<math:mtext>
				<xsl:text>coefficient_ring</xsl:text>
			</math:mtext>
		</math:mrow>
	</xsl:template>

	<!--
    degree
  -->
	<xsl:template match="om:OMA[om:OMS[@name='degree']]|OMA[OMS[@name='degree']]">
		<math:mrow>
			<math:mtext>degree</math:mtext>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<!--
    expand
  -->
	<xsl:template match="om:OMS[@cd='polynomial1' and @name='expand'] |     OMS[@cd='polynomial1' and @name='expand']">
		<math:mrow>
			<math:mtext>
				<xsl:text>expand</xsl:text>
			</math:mtext>
		</math:mrow>
	</xsl:template>

	<!--
    leading_coefficient
  -->
	<xsl:template match="     om:OMS[@cd='polynomial1' and @name='leading_coefficient'] |     OMS[@cd='polynomial1' and @name='leading_coefficient']">
		<math:mrow>
			<math:mtext>
				<xsl:text>lc</xsl:text>
			</math:mtext>
		</math:mrow>
	</xsl:template>

	<!--
    leading_monomial
  -->
	<xsl:template match="     om:OMS[@cd='polynomial1' and @name='leading_monomial'] |     OMS[@cd='polynomial1' and @name='leading_monomial']">
		<math:mrow>
			<math:mtext>
				<xsl:text>lm</xsl:text>
			</math:mtext>
		</math:mrow>
	</xsl:template>

	<!--
    leading_term
  -->
	<xsl:template match="om:OMS[@cd='polynomial1' and @name='leading_term'] |     OMS[@cd='polynomial1' and @name='leading_term']">
		<math:mrow>
			<math:mtext>
				<xsl:text>lt</xsl:text>
			</math:mtext>
		</math:mrow>
	</xsl:template>


	<!-- ********************************************************************

       relation1

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@cd='relation1' and @name='eq']]|OMA[OMS[@cd='relation1' and @name='eq']]">
		<xsl:choose>
			<xsl:when test="@style='colon'">
				<math:mrow>
					<xsl:apply-templates select="*[2]"/>
					<math:mo>:</math:mo>
					<xsl:apply-templates select="*[3]"/>
				</math:mrow>
			</xsl:when>
			<xsl:when test="@style='multi'">
				<xsl:apply-templates select="*[2]"/>
				<xsl:for-each select="*[position() &gt; 2]">
					<math:mo>=</math:mo>
					<xsl:apply-templates select="."/>
				</xsl:for-each>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>
					<xsl:apply-templates select="*[2]"/>
					<math:mo>=</math:mo>
					<xsl:apply-templates select="*[3]"/>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='relation1' and @name='eq']|OMS[@cd='relation1' and @name='eq']">
		<math:mo>=</math:mo>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='relation1' and @name='geq']]|OMA[OMS[@cd='relation1' and @name='geq']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>&#x2265;</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='relation1' and @name='gt']]|OMA[OMS[@cd='relation1' and @name='gt']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>&gt;</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='relation1' and @name='leq']]|OMA[OMS[@cd='relation1' and @name='leq']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>&#x2264;</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='relation1' and @name='lt']]|OMA[OMS[@cd='relation1' and @name='lt']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>&lt;</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='relation1' and @name='neq']]|OMA[OMS[@cd='relation1' and @name='neq']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>&#x2260;</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='relation1' and @name='gt']|OMS[@cd='relation1' and @name='gt']">
		<math:mo>&gt;</math:mo>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='relation1' and @name='leq']|OMS[@cd='relation1' and @name='leq']">
		<math:mo>&#x2264;</math:mo>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='relation1' and @name='lt']|OMS[@cd='relation1' and @name='lt']">
		<math:mo>&lt;</math:mo>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='relation1' and @name='approx']]|OMA[OMS[@cd='relation1' and @name='approx']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>&#x2248;</math:mo>
			<!-- 8776 = U+2248 almost equal to -->
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<!-- ********************************************************************

       relation2

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@cd='relation2' and @name='approx']]|OMA[OMS[@cd='relation2' and @name='approx']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>
				<xsl:text>&#x2248;</xsl:text>
				<!-- 8776 = U+2248 almost equal to -->
			</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='eqs']]|OMA[OMS[@name='eqs']]">
		<math:mrow>
			<math:mrow>
				<xsl:apply-templates select="*[2]"/>
			</math:mrow>
			<xsl:for-each select="*[position() &gt; 2]">
				<math:mrow>
					<math:mo>=</math:mo>
				</math:mrow>
				<math:mrow>
					<xsl:apply-templates select="."/>
				</math:mrow>
			</xsl:for-each>
		</math:mrow>
	</xsl:template>

	<!-- ********************************************************************

       relation4

       ******************************************************************** -->


	<xsl:template match="om:OMA[om:OMS[@name='eqs']]|OMA[OMS[@name='eqs']]">
		<math:mrow>
			<math:mrow>
				<xsl:apply-templates select="*[2]"/>
			</math:mrow>
			<xsl:for-each select="*[position() &gt; 2]">
				<math:mrow>
					<math:mo>=</math:mo>
				</math:mrow>
				<math:mrow>
					<xsl:apply-templates select="."/>
				</math:mrow>
			</xsl:for-each>
		</math:mrow>
	</xsl:template>
	<!-- *******************************************************************

       ring1

       ******************************************************************* -->

	<xsl:template match="om:OMA[om:OMS[@cd='ring1' and @name='ring']]|OMA[OMS[@cd='ring1' and @name='ring']]">
		<math:mfenced open="[" close="]" separator=",">
			<math:mrow>
				<xsl:apply-templates select="*[2]"/>
			</math:mrow>
			<math:mrow>
				<xsl:apply-templates select="*[3]"/>
			</math:mrow>
			<math:mrow>
				<xsl:apply-templates select="*[4]"/>
			</math:mrow>
			<math:mrow>
				<xsl:apply-templates select="*[5]"/>
			</math:mrow>
			<math:mrow>
				<xsl:apply-templates select="*[6]"/>
			</math:mrow>
			<math:mrow>
				<xsl:apply-templates select="*[7]"/>
			</math:mrow>
		</math:mfenced>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='ring1' and @name='subring']]|OMA[OMS[@cd='ring1' and @name='subring']]">
		<math:msub>
			<math:mrow>
				<math:mo>&lt;</math:mo>
				<xsl:apply-templates select="*[3]"/>
				<math:mo>&gt;</math:mo>
			</math:mrow>
			<math:mi>
				<xsl:apply-templates select="*[2]"/>
			</math:mi>
		</math:msub>
	</xsl:template>

	<!-- *******************************************************************

       ring2

       ******************************************************************* -->

	<xsl:template match="om:OMA[om:OMS[@cd='ring2' and @name='left_multiplication']]|OMA[OMS[@cd='ring2' and @name='left_multiplication']]">
		<math:msub>
			<math:mo>L</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:msub>
	</xsl:template>

	<!-- *******************************************************************

       ring3

       ******************************************************************* -->

	<xsl:template match="om:OMA[om:OMS[@cd='ring3' and @name='ideal']]|OMA[OMS[@cd='ring3' and @name='ideal']]">
		<xsl:choose>
			<xsl:when test="@style='bracket'">
				<math:mrow>(<xsl:for-each select="*[position()&gt;2]"><xsl:apply-templates select="."/><xsl:if test="position() &lt; last()"><math:mo>,</math:mo></xsl:if></xsl:for-each>)</math:mrow>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>{<xsl:for-each select="*[position()&gt;2]"><xsl:apply-templates select="."/><xsl:if test="position() &lt; last()"><math:mo>,</math:mo></xsl:if></xsl:for-each>}
					<xsl:apply-templates select="*[2]"/>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>



	<xsl:template match="om:OMA[om:OMS[@cd='ring3' and @name='poly_ring']]|OMA[OMS[@cd='ring3' and @name='poly_ring']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>[</math:mo>
			<xsl:apply-templates select="*[3]"/>
			<math:mo>]</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='ring3' and @name='matrix_ring']]|OMA[OMS[@cd='ring3' and @name='matrix_ring']]">
		<math:mrow>
			<math:msub>
				<math:mo>M</math:mo>
				<xsl:apply-templates select="*[2]"/>
			</math:msub>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[3]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@cd='ring3' and @name='m_poly_ring']]|OMA[OMS[@cd='ring3' and @name='m_poly_ring']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>


	<xsl:template match="om:OMA[om:OMS[@name='multiplicative_group']]|OMA[OMS[@name='multiplicative_group']]">
		<math:msup>
			<math:mfenced open="(" close=")" separator=",">
				<xsl:apply-templates select="*[2]"/>
			</math:mfenced>
			<math:mo>*</math:mo>
		</math:msup>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='ring3' and @name='principal_ideal']]|OMA[OMS[@cd='ring3' and @name='principal_ideal']]">
		<xsl:choose>
			<xsl:when test="@style='brackets'">
				<math:mrow>(<xsl:apply-templates select="*[3]"/>)</math:mrow>
			</xsl:when>
			<xsl:otherwise>
				<math:mrow>(<xsl:apply-templates select="*[3]"/>)
					<xsl:apply-templates select="*[2]"/>
				</math:mrow>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>



	<xsl:template match="om:OMA[om:OMS[@cd='ring3' and @name='quotient_ring']]|OMA[OMS[@cd='ring3' and @name='quotient_ring']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>/</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<!-- *******************************************************************

       rounding1

       ******************************************************************* -->

	<xsl:template match="om:OMA[om:OMS[@cd='rounding1' and @name='ceiling']]|OMA[OMS[@cd='rounding1' and @name='ceiling']]">
		<math:mrow>
			<math:mi>sup</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<!-- *******************************************************************

       semigroup1

       ******************************************************************* -->

	<xsl:template match="om:OMA[om:OMS[@cd='semigroup1' and @name='semigroup']]|OMA[OMS[@cd='semigroup1' and @name='semigroup']]">
		<math:mrow>
			<math:mo>[</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>,</math:mo>
			<xsl:apply-templates select="*[3]"/>
			<math:mo>]</math:mo>
		</math:mrow>
	</xsl:template>


	<!-- *******************************************************************

       semigroup3

       ******************************************************************* -->

	<xsl:template match="om:OMA[om:OMS[@cd='semigroup3' and @name='maps_semigroup']]|OMA[OMS[@cd='semigroup3' and @name='maps_semigroup']]">
		<math:mrow>
			<math:mo>Maps(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<!-- *******************************************************************

       set1

       ******************************************************************* -->

	<!-- put braces on arguments that are from set1 -->
	<xsl:template mode="set1" match="om:OMA[om:OMS[@cd=&quot;set1&quot; and index-of((&quot;carthesian_product&quot;,      &quot;intersect&quot;, &quot;union&quot;, &quot;setdiff&quot;),@name)]]|OMA[OMS[@cd=&quot;set1&quot; and      index-of((&quot;cartesian_product&quot;, &quot;intersect&quot;, &quot;union&quot;, &quot;setdiff&quot;),@name)]]">
		<!-- add opening bracket -->
		<xsl:text>(</xsl:text>

		<!-- apply the default template -->
		<xsl:apply-templates mode="#default" select="."/>

		<!-- add closing bracket -->
		<xsl:text>)</xsl:text>
	</xsl:template>

	<!-- apply the default template -->
	<xsl:template match="*" mode="set1">
		<xsl:apply-templates mode="#default" select="."/>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set1' and @name='cartesian_product']]|OMA[OMS[@cd='set1' and @name='cartesian_product']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]" mode="set1"/>
			<xsl:for-each select="*[position()&gt;2]">
				<math:mo>
					<!-- U+00D7 Multiplication sign (Cartesian product) -->
					<xsl:text>&#xD7;</xsl:text>
				</math:mo>
				<xsl:apply-templates select="." mode="set1"/>
			</xsl:for-each>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='set1' and @name='emptyset']|OMS[@cd='set1' and @name='emptyset']">
		<math:mrow>
			<math:mo>
				<!-- U+2205 empty set -->
				<xsl:text>&#x2205;</xsl:text>
			</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set1' and @name='in']]|OMA[OMS[@cd='set1' and @name='in']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>
				<!-- U+2208 element of -->
				<xsl:text>&#x2208;</xsl:text>
			</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='set1' and @name='in']|OMS[@cd='set1' and @name='in']">
		<math:mo>
			<!-- U+2208 element of -->
			<xsl:text>&#x2208;</xsl:text>
		</math:mo>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set1' and @name='intersect']]|OMA[OMS[@cd='set1' and @name='intersect']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]" mode="set1"/>
			<xsl:for-each select="*[position()&gt;2]">
				<math:mo>
					<!-- U+2229 intersection -->
					<xsl:text>&#x2229;</xsl:text>
				</math:mo>
				<xsl:apply-templates select="." mode="set1"/>
			</xsl:for-each>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set1' and @name='map']]|OMA[OMS[@cd='set1' and @name='map']]">
		<math:mrow>
			<math:mo>
				<xsl:text>{</xsl:text>
			</math:mo>
			<xsl:apply-templates select="om:OMBIND/*[3]|OMBIND/*[3]"/>
			<math:mo>
				<xsl:text>|</xsl:text>
			</math:mo>
			<math:mrow>
				<xsl:for-each select="om:OMBIND/om:OMBVAR/*|OMBIND/OMBVAR/*">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
				<math:mo>
					<!-- U+2208 element of -->
					<xsl:text>&#x2208;</xsl:text>
				</math:mo>
				<xsl:apply-templates select="*[3]"/>
			</math:mrow>
			<math:mo>
				<xsl:text>}</xsl:text>
			</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set1' and @name='notin']]|OMA[OMS[@cd='set1' and @name='notin']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>
				<!-- U+2209 not an element of -->
				<xsl:text>&#x2209;</xsl:text>
			</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='set1' and @name='notin']|OMS[@cd='set1' and @name='notin']">
		<math:mo>
			<!-- U+2209 not an element of -->
			<xsl:text>&#x2209;</xsl:text>
		</math:mo>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set1' and @name='notprsubset']]|OMA[OMS[@cd='set1' and @name='notprsubset']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>
				<!-- U+2284 not a subset of -->
				<xsl:text>&#x2284;</xsl:text>
			</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set1' and @name='notsubset']]|OMA[OMS[@cd='set1' and @name='notsubset']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>
				<!-- U+2288 neither a subset of nor equal to -->
				<xsl:text>&#x2288;</xsl:text>
			</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set1' and @name='prsubset']]|OMA[OMS[@cd='set1' and @name='prsubset']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>
				<!-- U+2ACF closed subset -->
				<xsl:text>&#x2ACF;</xsl:text>
			</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set1' and @name='set']]|OMA[OMS[@cd='set1' and @name='set']]">
		<math:mrow>
			<math:mfenced separator=",">
				<xsl:attribute name="open">
					<xsl:text>{</xsl:text>
				</xsl:attribute>
				<xsl:attribute name="close">
					<xsl:text>}</xsl:text>
				</xsl:attribute>
				<xsl:for-each select="*[position() &gt; 1]">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
			</math:mfenced>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set1' and @name='setdiff']]|OMA[OMS[@cd='set1' and @name='setdiff']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]" mode="set1"/>
			<math:mo>
				<!-- U+2216 set minus -->
				<xsl:text>&#x2216;</xsl:text>
			</math:mo>
			<xsl:apply-templates select="*[3]" mode="set1"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[position()= 1 and @cd='set1' and @name='size']]|OMA[OMS[position()= 1 and @cd='set1' and @name='size']]">
		<math:mrow>
			<math:mfenced open="|" close="|" separator="">
				<xsl:apply-templates select="*[2]"/>
			</math:mfenced>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set1' and @name='subset']]|OMA[OMS[@cd='set1' and @name='subset']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]"/>
			<!-- U+2AD1 closed subset or equal to -->
			<math:mo>
				<xsl:text>&#x2AD1;</xsl:text>
			</math:mo>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set1' and @name='suchthat']]|OMA[OMS[@cd='set1' and @name='suchthat']]">
		<math:mo>
			<xsl:text>{</xsl:text>
		</math:mo>
		<xsl:for-each select="om:OMBIND/om:OMBVAR/*|OMBIND/OMBVAR/*">
			<xsl:apply-templates select="."/>
		</xsl:for-each>
		<math:mo>
			<!-- U+2208 element of -->
			<xsl:text>&#x2208;</xsl:text>
		</math:mo>
		<xsl:apply-templates select="*[2]"/>
		<math:mo>
			<xsl:text>  </xsl:text>
		</math:mo>
		<math:mo>
			<xsl:text> | </xsl:text>
		</math:mo>
		<math:mo>
			<xsl:text>  </xsl:text>
		</math:mo>
		<xsl:apply-templates select="om:OMBIND/*[3]|OMBIND/*[3]"/>
		<math:mo>
			<xsl:text>}</xsl:text>
		</math:mo>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set1' and @name='union']]|OMA[OMS[@cd='set1' and @name='union']]">
		<math:mrow>
			<xsl:apply-templates select="*[2]" mode="set1"/>
			<xsl:for-each select="*[position()&gt;2]">
				<math:mo>
					<!-- U+222A union -->
					<xsl:text>&#x222A;</xsl:text>
				</math:mo>
				<xsl:apply-templates select="." mode="set1"/>
			</xsl:for-each>
		</math:mrow>
	</xsl:template>

	<!-- *******************************************************************

       set3

       ******************************************************************* -->

	<xsl:template match="om:OMA[om:OMS[@cd='set3' and @name='apply_to_set']]|OMA[OMS[@cd='set3' and @name='apply_to_set']]">
		<math:mo>{</math:mo>
		<xsl:choose>
			<xsl:when test="om:OMA[position()= 3 and om:OMS[@cd='interval1' and @name='integer_interval']]|OMA[position()= 3 and OMS[@cd='interval1' and @name='integer_interval']]">
				<math:mrow>
					<xsl:apply-templates select="*[2]"/>
				</math:mrow>
			</xsl:when>
			<xsl:otherwise>
				<xsl:apply-templates select="om:OMBIND/*[3]|OMBIND/*[3]"/>
				<math:mo>
				</math:mo>
				<math:mo>|</math:mo>
				<math:mo>
				</math:mo>
				<xsl:for-each select="om:OMBIND/om:OMBVAR/*|OMBIND/OMBVAR/*">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
				<math:mo>&#x2208;</math:mo>
				<xsl:apply-templates select="*[3]"/>
			</xsl:otherwise>
		</xsl:choose>
		<math:mo>}</math:mo>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set3' and @name='big_intersect']]|OMA[OMS[@cd='set3' and @name='big_intersect']]">
		<math:mrow>
			<math:mo>&#x2229;</math:mo>
			<xsl:apply-templates select="*[2]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set3' and @name='big_union']]|OMA[OMS[@cd='set3' and @name='big_union']]">
		<math:mrow>
			<math:mo>&#x222A;</math:mo>
			<xsl:apply-templates select="*[2]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set3' and @name='cartesian_power']]|OMA[OMS[@cd='set3' and @name='cartesian_power']]">
		<math:msup>
			<xsl:apply-templates select="*[2]"/>
			<xsl:apply-templates select="*[3]"/>
		</math:msup>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set3' and @name='powerset']]|OMA[OMS[@cd='set3' and @name='powerset']]">
		<math:mrow>
			<math:mo>P</math:mo>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='k_subsets' and @cd='set3']]|OMA[OMS[@name='k_subsets' and @cd='set3']]">
		<math:mrow>
			<math:mo>(</math:mo>
			<math:mtable>
				<math:mtr>
					<math:mtd>
						<xsl:apply-templates select="*[2]"/>
					</math:mtd>
				</math:mtr>
				<math:mtr>
					<math:mtd>
						<xsl:apply-templates select="*[3]"/>
					</math:mtd>
				</math:mtr>
			</math:mtable>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set3' and @name='map_on_set']]|OMA[OMS[@cd='set3' and @name='map_on_set']]">
		<math:mo>{</math:mo>
		<xsl:choose>
			<xsl:when test="om:OMA[position()= 3 and om:OMS[@cd='interval1' and @name='integer_interval']]|OMA[position()= 3 and OMS[@cd='interval1' and @name='integer_interval']]">
				<math:mrow>
					<xsl:apply-templates select="*[2]"/>
				</math:mrow>
			</xsl:when>
			<xsl:otherwise>
				<xsl:apply-templates select="om:OMBIND/*[3]|OMBIND/*[3]"/>
				<math:mo>|</math:mo>
				<math:mo>
				</math:mo>
				<xsl:for-each select="om:OMBIND/om:OMBVAR/*|OMBIND/OMBVAR/*">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
				<math:mo>&#x2208;</math:mo>
				<xsl:apply-templates select="*[3]"/>
			</xsl:otherwise>
		</xsl:choose>
		<math:mo>}</math:mo>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='set3' and @name='map_with_target']]|OMA[OMS[@cd='set3' and @name='map_with_target']]">
		<math:mo>{</math:mo>
		<xsl:choose>
			<xsl:when test="om:OMA[position()= 3 and om:OMS[@cd='interval1' and @name='integer_interval']]|OMA[position()= 3 and OMS[@cd='interval1' and @name='integer_interval']]">
				<math:mrow>
					<xsl:apply-templates select="*[2]"/>
				</math:mrow>
			</xsl:when>
			<xsl:otherwise>
				<xsl:apply-templates select="om:OMBIND/*[3]|OMBIND/*[3]"/>
				<math:mspace width="3pt"/>
				<math:mo>|</math:mo>
				<math:mspace width="3pt"/>
				<xsl:for-each select="om:OMBIND/om:OMBVAR/*|OMBIND/OMBVAR/*">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
				<math:mo>&#x2208;</math:mo>
				<xsl:apply-templates select="*[3]"/>
			</xsl:otherwise>
		</xsl:choose>
		<math:mo>}</math:mo>
	</xsl:template>

	<!-- *******************************************************************

       setname1

       ******************************************************************* -->

	<xsl:template match="om:OMS[@cd='setname1' and @name='C']|OMS[@cd='setname1' and @name='C']">
		<math:mrow>
			<math:mi>&#x2102;</math:mi>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='setname1' and @name='P']|OMS[@cd='setname1' and @name='P']">
		<math:mrow>
			<math:mi>&#x2119;</math:mi>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='setname1' and @name='N']|OMS[@cd='setname1' and @name='N']">
		<math:mrow>
			<math:mi>&#x2115;</math:mi>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='setname1' and @name='Q']|OMS[@cd='setname1' and @name='Q']">
		<math:mrow>
			<math:mi>&#x211A;</math:mi>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='setname1' and @name='R']|OMS[@cd='setname1' and @name='R']">
		<math:mrow>
			<math:mi>&#x211D;</math:mi>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='setname1' and @name='Z']|OMS[@cd='setname1' and @name='Z']">
		<math:mrow>
			<math:mi>&#x2124;</math:mi>
		</math:mrow>
	</xsl:template>

	<!-- *******************************************************************

       setname2

       ******************************************************************* -->

	<xsl:template match="om:OMS[@cd='setname2' and @name='A']|OMS[@cd='setname2' and @name='A']">
		<math:mrow>
			<math:mo>Algebraic</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='setname2' and @name='Boolean']|OMS[@cd='setname2' and @name='Boolean']">
		<math:mrow>
			<math:mo>Boolean</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='setname2' and @name='GFp']]|OMA[OMS[@cd='setname2' and @name='GFp']]">
		<math:mrow>
			<math:mi>GF</math:mi>
			<math:mo>(</math:mo>
			<math:mi>
				<xsl:apply-templates select="*[2]"/>
			</math:mi>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='setname2' and @name='GFpn']]|OMA[OMS[@cd='setname2' and @name='GFpn']]">
		<math:mrow>
			<math:mi>GF</math:mi>
			<math:mo>(</math:mo>
			<math:mi>
				<xsl:apply-templates select="*[2]"/>
			</math:mi>
			<math:mo>,</math:mo>
			<math:mi>
				<xsl:apply-templates select="*[3]"/>
			</math:mi>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMS[@cd='setname2' and @name='H']|OMS[@cd='setname2' and @name='H']">
		<math:mrow>
			<math:mo>Quaternions</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='setname2' and @name='QuotientField']]|OMA[OMS[@cd='setname2' and @name='QuotientField']]">
		<math:mrow>
			<math:mi>QF</math:mi>
			<math:mo>(</math:mo>
			<math:mi>
				<xsl:apply-templates select="*[2]"/>
			</math:mi>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@name='Zm']]|OMA[OMS[@name='Zm']]">
		<math:mrow>&#x2124;
      /<xsl:apply-templates select="*[2]"/> &#x2124;</math:mrow>
	</xsl:template>

	<!-- ********************************************************************

       sequence1

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@name='sequence'and @cd='sequence1']]|OMA[OMS[@name='sequence'and @cd='sequence1']]">
		<math:mrow>
			<math:mfenced open="" close="" separator=",">
				<xsl:for-each select="*[position()&gt;1]">
					<xsl:apply-templates select="."/>
				</xsl:for-each>
			</math:mfenced>
		</math:mrow>
	</xsl:template>

	<!-- ********************************************************************

       transc1

       ******************************************************************** -->

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='arccos']]|OMA[OMS[@cd='transc1' and @name='arccos']]">
		<math:mrow>
			<math:mi>arccos</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='arccosh']]|OMA[OMS[@cd='transc1' and @name='arccosh']]">
		<math:mrow>
			<math:mi>arccosh</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='arccot']]|OMA[OMS[@cd='transc1' and @name='arccot']]">
		<math:mrow>
			<math:mi>arccot</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='arccoth']]|OMA[OMS[@cd='transc1' and @name='arccoth']]">
		<math:mrow>
			<math:mi>arccoth</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='arccsc']]|OMA[OMS[@cd='transc1' and @name='arccsc']]">
		<math:mrow>
			<math:mi>arccsc</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='arccsch']]|OMA[OMS[@cd='transc1' and @name='arccsch']]">
		<math:mrow>
			<math:mi>arccsch</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='arcsec']]|OMA[OMS[@cd='transc1' and @name='arcsec']]">
		<math:mrow>
			<math:mi>arcsec</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='arcsech']]|OMA[OMS[@cd='transc1' and @name='arcsech']]">
		<math:mrow>
			<math:mi>arcsech</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='arcsin']]|OMA[OMS[@cd='transc1' and @name='arcsin']]">
		<math:mrow>
			<math:mi>arcsin</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='arcsinh']]|OMA[OMS[@cd='transc1' and @name='arcsinh']]">
		<math:mrow>
			<math:mi>arcsinh</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='arctan']]|OMA[OMS[@cd='transc1' and @name='arctan']]">
		<math:mrow>
			<math:mi>arctan</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='arctanh']]|OMA[OMS[@cd='transc1' and @name='arctanh']]">
		<math:mrow>
			<math:mi>arctanh</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='cos']]|OMA[OMS[@cd='transc1' and @name='cos']]">
		<math:mrow>
			<math:mi>cos</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='cosh']]|OMA[OMS[@cd='transc1' and @name='cosh']]">
		<math:mrow>
			<math:mi>cosh</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='cot']]|OMA[OMS[@cd='transc1' and @name='cot']]">
		<math:mrow>
			<math:mi>cot</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='coth']]|OMA[OMS[@cd='transc1' and @name='coth']]">
		<math:mrow>
			<math:mi>coth</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='csc']]|OMA[OMS[@cd='transc1' and @name='csc']]">
		<math:mrow>
			<math:mi>csc</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='csch']]|OMA[OMS[@cd='transc1' and @name='csch']]">
		<math:mrow>
			<math:mi>csch</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='exp']]|OMA[OMS[@cd='transc1' and @name='exp']]">
		<math:mrow>
			<math:mi>exp</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='ln']]|OMA[OMS[@cd='transc1' and @name='ln']]">
		<math:mrow>
			<math:mi>ln</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='log']]|OMA[OMS[@cd='transc1' and @name='log']]">
		<math:mrow>
			<math:msub>
				<math:mi>log</math:mi>
				<xsl:apply-templates select="*[2]"/>
			</math:msub>
			<xsl:apply-templates select="*[3]"/>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='sec']]|OMA[OMS[@cd='transc1' and @name='sec']]">
		<math:mrow>
			<math:mi>sec</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='sech']]|OMA[OMS[@cd='transc1' and @name='sech']]">
		<math:mrow>
			<math:mi>sech</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='sin']]|OMA[OMS[@cd='transc1' and @name='sin']]">
		<math:mrow>
			<math:mi>sin</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='sinh']]|OMA[OMS[@cd='transc1' and @name='sinh']]">
		<math:mrow>
			<math:mi>sinh</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='tan']]|OMA[OMS[@cd='transc1' and @name='tan']]">
		<math:mrow>
			<math:mi>tan</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>

	<xsl:template match="om:OMA[om:OMS[@cd='transc1' and @name='tanh']]|OMA[OMS[@cd='transc1' and @name='tanh']]">
		<math:mrow>
			<math:mi>tanh</math:mi>
			<math:mo>(</math:mo>
			<xsl:apply-templates select="*[2]"/>
			<math:mo>)</math:mo>
		</math:mrow>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2007. Progress Software Corporation. &#x4FDD;&#x7559;&#x6240;&#x6709;&#x6743;&#x529B;.
<metaInformation>
<scenarios/><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->